Boost logo

Boost :

From: Christoph Ludwig (cludwig_at_[hidden])
Date: 2005-12-02 08:06:04


On Fri, Dec 02, 2005 at 12:22:22PM -0000, John Maddock wrote:
> Yep: the formats are mostly well known and the bit twiddling isn't that hard
> once you know what the format is, but there's at least one problem case:
> long double's on Darwin. I can't find any information on these after a
> quick google search, but I believe they're effectively a sum of two doubles.
> If so this is exceptionally bad form because it violates the most
> fundamental principal of IEEE arithmatic that a number is n*2^k.
> (Background: epsilon is very small for this type, it's possible to add a
> number "delta" to 1.0L and still get a distict value when "delta" is much
> smaller than the number of bit's in a long double would otherwise indicate.
> This makes a *lot* of IEEE based reasoning invalid. If anyone has more
> information on this type I'd appreciate a reference).

I don't have any first hand experience with Darwin's long double, but what you
wrote above seems correct according to

<url:http://tinyurl.com/9thr3> (<url:http://gcc.gnu.org/viewcvs/trunk/gcc/config/rs6000/darwin-ldouble-format?rev=85371&view=markup>)

Regards

Christoph

-- 
http://www.informatik.tu-darmstadt.de/TI/Mitarbeiter/cludwig.html
LiDIA: http://www.informatik.tu-darmstadt.de/TI/LiDIA/Welcome.html

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk