Swapping endpoint signals reverses the gradient arrow. Exact arithmetic here means exact results for the stated model inputs; measured inputs still carry uncertainty and significant-figure limits.
highlighted = computed this step
Reverse the endpoint signals
Now the left signal is 18 and the right signal is 6.
6−18=−12
The sign chooses the gradient direction
Difference -12 over 6 m gives gradient -2 per meter.