-2.71050543121376108502E-0020 seems close enough to zero, isn't it? I.e. that's all the accuracy digits the compiler actually has, and it isn't even able to determine Pi/2 with greater accuracy without special effort.
Well after a good night's sleep I managed to scroll my eyes to the right far enough to see it too, thank you.
E-20? How accurate do you want it to be?
Oh not much, its just for screen coordinates so 2 decimal digits should suffice. I just did not look far enough for 4 hours!!
That's correct. Note that the math unit has IsZero functions for the case you need to determine if a float value should be considered equal to zero:
function IsZero(const A: Single; Epsilon: Single): Boolean; overload;
function IsZero(const A: Single): Boolean;inline; overload;
{$ifdef FPC_HAS_TYPE_DOUBLE}
function IsZero(const A: Double; Epsilon: Double): Boolean; overload;
function IsZero(const A: Double): Boolean;inline; overload;
{$endif FPC_HAS_TYPE_DOUBLE}
{$ifdef FPC_HAS_TYPE_EXTENDED}
function IsZero(const A: Extended; Epsilon: Extended): Boolean; overload;
function IsZero(const A: Extended): Boolean;inline; overload;
{$endif FPC_HAS_TYPE_EXTENDED}
Which gives using your slightly modified code:
Deg/Rad90: 1.5707963267948966E+000 FALSE
Cos -4.4807361612917013E-001: 6.1232339957367660E-017 TRUE
Sin 8.9399666360055796E-001: 1.0000000000000000E+000 FALSE
Thank you sir, that will prove very useful in the near future.
sorry to waste your time guys and thanks for heads up.