http://d.puremagic.com/issues/show_bug.cgi?id=8562
--- Comment #3 from Caligo <iteronve...@gmail.com> 2012-08-20 09:57:19 PDT --- (In reply to comment #2) > isNan(x) can be implemented at compile time by: > > return (x != x); > > It's not exactly the same at run time, because it sets the floating point > hardware exception flags, whereas isNaN does not. But there are no exception > flags at compile time. To avoid the casting in isNaN() you would need to know when it's getting called at compile-time and when it's getting called at run-time, correct? There is no way to know that, so we end up with two functions, isNaN() and staticIsNaN(), correct? bool staticIsNaN(R)(R x) if(isFloatingPoint!R) { return x != x; } p.s. why are exception flags being set in a nothrow? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------