Subject: Re: [boost] Extracting floating point constant exponent/mantissa at compile time
From: Peder Holt (peder.holt_at_[hidden])
Date: 2009-04-16 15:51:53
2009/4/16 Joel Falcou <joel.falcou_at_[hidden]>
> Indeed it helps. I ended up with the roughly same algorithm but I guess I
> failed horribly at turning it into a macro. I'll try to get it right.
> What part of this thing is not standard ?
See this thread:
It is discussed there. It seems like a lot of compilers accepts the syntax,
> Why do you split the double in 2 parts instead of storing it in a
> integral_constant<uint64_t> ?
Very good question. I am thinking the same. Don't remember, but it would
definitively make life a lot easier.
> Can't it be easier if we defines a float as a value in [0,1> and a power of
> ten aka FLOAT(0.146824,+6) then ocnvert the a*10^b into m*2^e ?
That's what I did originally, but you loose a lot of precision in the
> Is boost::mpl::double_ planne dot be merged sometimes in main trunk ?
No plan as I know of. Haven't looked at the code for some years now.
> Thanks in advance
> Joel Falcou - Assistant Professor
> PARALL Team - LRI - Universite Paris Sud XI
> Tel : (+33)1 69 15 66 35
> Unsubscribe & other changes:
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk