hay#=a#*a#+b#*b#-c#*c#
div#=hay#/2*b#
That is probably your problem. Don't forget: Computers are inherently stupid.They will do EXACTLY What you well them so for instance:
div#=hay#/2*b#
Will be read as
div#=(hay#/2)*b#
Introducing the correct parenthesis should correct the problem (though I haven't tested that).
So this is what you want:
hay#=(a#*a#)+(b#*b#)-(c#*c#)
div#=hay#/(2.0*b#)
Also notice the 2.0 . It could be getting confused with an integer on the bottom. 2.0 is a float and will maintain it throughout the calculations (again, I don't know if it is changing anything but it can't hurt)
Hope this helps
Great Quote:
"Time...LINE??? Time isn't made out of lines...it is made out of circles. That is why clocks are round!" -Caboose