lol, that's ridiculous! You shouldn't do that by casting to string and back. Way too exprensive.

Just have a look at the Round(), Floor() and Ceil() functions in the math unit:

Some good info can be found here:
http://www.delphibasics.co.uk/RTL.asp?Name=Round

Btw: I don't understand your syntax. You're doing this:

Code:
result_flt:single=math.ArcTan2(dy,dx);
Is that even possible? Shouldn't it be?
Code:
var result_flt: single;
begin
  result_flt := math.ArcTan2(dy,dx);
end;