|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2005-06-12 14:36:51
Peder Holt <peder.holt_at_[hidden]> writes:
<snip>
[Please try to limit the amount of quoted text in your postings]
>> I think you need to at least provide the option, for people who want to
>> write portable code.
>
> Definitely. I'll try to change the operators (times,plus etc.) to use
> integral operations only.
>
>>
>> It doesn't have to be all that ugly, you know. Do you need more than
>> 32 bits after the decimal point?
>>
>> double< 3,1415927 ,E<+6> >
>
> Not bad. The double type does have 16 decimals precision. Is it an
> option to use long long for the decimal part?
Only on compilers that support it. Again, that's a non-C++98 extension.
> I discovered that using base 2 exponent in stead of base 10 exponent
I don't understand what you mean her. Where is this exponent used?
Does the user specify the exponent in base 2 (probably not)? YOu must
mean in the representation?
> gives you the same accuracy as with a regular double expression.
> Is this an absolute requirement,
^^^^
a base 2 exponent or the same accuracy as a double?
> or is an approximation to double sufficient?
I don't know. Better ask your target audience!
I'd guess they don't want an approximation, but I'm only guessing.
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk