Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2006-05-02 13:33:30

>> I tend to agree with the MS engineers here. I've found out only
>> yesterday that the FPU/math library is not entirely deterministic in
>> some calculations (including square roots and trigonometry, typical
>> 3d stuff), so I think worrying about serialization/deserialization
>> is useless.

I disagree, it is certainly possible to serialise/deserialise exactly, glibc
manages it OK, so I see no reason why MS can't.

Square roots are exactly-rounded under IEEE arithmetic BTW, as are the usual
+ - * / operators: it's the functions that may return transcendental values
(cos sin exp, pow) which can never give exact answers purely as a matter of
principal: although in practice most implementations are last-bit-correct
for the vast majority of inputs.

> Do you have example code / pointers to documentation for that? I've
> always been under the impression that basic math is deterministic
> regardless of
> IEEE compliance, and would really like to know if/where there are
> cases where that doesn't hold.

I assume you've read "What Every Computer Scientist Should Know About
Floating-Point Arithmetic" at ?


Boost list run by bdawes at, gregod at, cpdaniel at, john at