speed = (distance_old - distance) / (time - time_old)
so code as
using 3 operators
where denominator is (distance_old - distance)
divisor is (time - time_old)
division is deninator/divisor
but it is mapped to code as
speed = distance_old - distance / time - time_old;
This is wrong.
Workaround is to only use one operator per expression.
If you add parentheses to each operator the expression will be correctly evaluated