Difference between revisions of "Talk:Ieee arithmetic"

m (Added a note to use macros instead of functions)
 
(Not IEEE arithmetic, nor maths: new section)
Line 8: Line 8:
 
</c>
 
</c>
 
Does it affect the benchmarks?
 
Does it affect the benchmarks?
 +
 +
== Not IEEE arithmetic, nor maths ==
 +
 +
NaN = NaN is never true.
 +
 +
And placing NaNs in a sort order isn't write either - REAL_32/64 are not totally ordered types.
 +
--[[User:Colin-adams|Colin-adams]] 14:48, 3 February 2010 (UTC)

Revision as of 05:48, 3 February 2010

Most probably C compilers inline functions, but just to be sure, I'd convert them into the macros:

#define to_raw_bits(d) *((EIF_NATURAL_64*)&(d))
 
#define eif_is_nan_bits(value) ((value & ~RTU64C(0x8000000000000000)) > RTU64C(0x7ff0000000000000))
 
#define eif_is_nan(v) ((*((EIF_NATURAL_64 *)&(v)) & ~RTU64C(0x8000000000000000)) > RTU64C(0x7ff0000000000000))

Does it affect the benchmarks?

Not IEEE arithmetic, nor maths

NaN = NaN is never true.

And placing NaNs in a sort order isn't write either - REAL_32/64 are not totally ordered types. --Colin-adams 14:48, 3 February 2010 (UTC)