Tool/software: Code Composer Studio
Hi All,
This is regarding setting a FLOAT64 variable to NaN value.
As per IEEE-754 1985 Double Format, need to set exponent part (e) to 2047 and fraction (f) != 0. In order to do this I am setting FLOAT64 variable to 0x7FF1000000000000. (0111,1111,1111,0001,0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000b)
But FLOAT64 variable is never holding 0x7FF1000000000000 value, when I set this value in "Code" or in "Expression" window, FLOAT64 variable is always latching to a different value 0x43DFF10000000000.
I am able to set the variable value as expected in "Memory Browser" by directly writing at the memory location of FLOAT64 variable. I did use strtod("NaN"), but unable to get the correct floating point literals.
Let me know, how I can set a FLOAT64 variable to NaN, Inf as per IEEE-754 1985 Double Format in "Code" or in "Expression" window.
My Development Environment is:
IDE : CCS 6.0.1
Compiler : ARM 5.1.6
Controller : TMS570LS3137
Any help regarding this is appreciated.
Regards,
Vishwas HC