I am develiping code for an aircraft and am testing some of our math routines. I am coming to find out that simple things like division by 0 oddly enough return 0 along with other strange issues.
My main question is that while sqrtf(-1.0) does return NAN, sqrt(-1.0) returns: 1.261340072242732e-157 which is not expected.
Here is the Variable dump:
test_number double 0x1F5BB55347BB24DC (Hex) 0xC30014F0
and here is the code
test_number = sqrt(-1.0); // NAN
How I got in this situation is that I am testing a wrapper for _Dclass and testing each return paramater. I was trying to force NAN into the test_number and couldn't. I couldn't even set it to the raw value of 0x7FF8000000000000. I finally poked memory with the value and got _DClass to return FP_NAN.
We are developing for the OMAP-L138
Code Composer Studio, Version: 5.1.0.09000
ARM compiler 4.9.4