Just had a brief look at this.
It seems that your equation is iterating itself inside the loop and producing an ever increasing value until it hits negative infinity. When it does this and repeats one more calculation it will present the answer as -1.#IND. This happens because you cannot perform a mathematical operation on infinity.
1.#QNAN - Quiet Not a Number
This is used when a mathematical operation is performed on inappropriate data, such as strings or the undefined value. Sometimes displayed when outside numerical limits.
1.#INF - Infinity (A number too large to evaluate)
-1.#INF - Negative infinity (A negative number too large to evaluate)
-1.#IND - Indefinite / Indeterminate (Can be caused by finding the square root of a negative number or a mathematical operation / state that is not recognised)
The drag force equation looks vaguely familiar however the other one I am not sure about.
It would be helpful if we knew what was being calculated in the equation that fails i.e. Acceleration, tractive effort, momentum, gradient forces etc.
Maybe if you put in the main loop the variables it will stop iterating itself but as I mentioned above we need to know exactly what it is for.
sync on
sync rate 60
do:cls
w# = 1550.0
rl# = 10.2
v# = 0
dt# = 0.1
C# = 10.2 * v#
B# = 0.5 * v# * abs(v#)
A# = 8000.0 - C# - B#
P# = A# * w#
v# = v# + dt# * P#
print "A: ",A#
print "B: ",B#
print "C: ",C#
print "P: ",P#
print "v: ",v#
sync:loop
end
Kind Regards Calculus