Boost logo

Boost :

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:
http://lists.boost.org/Archives/boost/2005/06/88185.php
It is discussed there. It seems like a lot of compilers accepts the syntax,
though.

> 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
conversion.

> 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.

Regards
Peder Holt

>
>
> Thanks in advance
>
> --
> ___________________________________________
> Joel Falcou - Assistant Professor
> PARALL Team - LRI - Universite Paris Sud XI
> Tel : (+33)1 69 15 66 35
>
>
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>


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