18 Mar
2015
18 Mar
'15
5:48 p.m.
ah wait.... Beman are you returning by value a non-native representation? Yes.
If so I imagine that may be an issue as the value gets moved to and from a register: some bit values are not permitted I believe - it's anybodies guess what the hardware would do to those? Ouch!
On reflection there's another more serious concern: depending on the FPU flags set, NaN's, whether signalling or otherwise, may raise a hardware exception when loaded to a register. The end result is your program aborts (unless you have some special handling in effect). My "favorite" example, was Borland's compiler/runtime, which set up the flags so that even calling numeric_limits<>::quiet_NaN() would abort your program :( John.