|
Boost Users : |
From: Sliwa, Przemyslaw (London) (Przemyslaw_Sliwa_at_[hidden])
Date: 2005-04-18 03:11:15
Why not?
AFAIK GSL, one of the most important open source numerical libraries
uses double precision, so I do not see the point why you say double is
not good enough for scientific applications.
Regards,
Pshemek
-----Original Message-----
From: boost-users-bounces_at_[hidden]
[mailto:boost-users-bounces_at_[hidden]] On Behalf Of Mauricio Gomes
Sent: 17 April 2005 04:12
To: boost-users_at_[hidden]
Subject: Re: [Boost-users] RE: Boost thread problem
Ben is right, you simply can't use double for any serious
financial/scientific calculation.
And indeed I hope someday an arbitrary math precision library be part
of the standard C++.
Look for a standard for the place where this is going to be used.
If there isn't one. Use an arbitrary math precision library anyway.
Take a look at mapm:
http://www.cuj.com/documents/s=8020/cuj0111ring/
http://www.tc.umn.edu/~ringx004/mapm-main.html
There are other comercial alternatives, a quick google search produced
this:
http://www.boic.com/b1mnum.pdf
http://www.boic.com/numintro.htm
Hope this helps,
Mauricio Gomes
Pensar Digital
phone: 55-11-4121-6287
mobile: 55-11-8319-9610
http://pensardigital.com
On Apr 15, 2005, at 2:37 PM, Ben Hutchings wrote:
> Sliwa, Przemyslaw (London) wrote:
>> Thanks, Ben, what should I use for representing the money amounts? A
>> boolean :)) ?
>
> If you're dealing with other people's money then there are regulations
> that specify the required intermediate precision and rounding rules,
> which may vary from place to place. I believe you'll need to use
> fixed-point decimal fractions, perhaps implemented as integer counts
> of hundredths or ten-thousandths of a currency unit. I've not done
> this myself so I don't know the details, but I'm fairly sure that
> getting this wrong can put you on the wrong side of the law.
>
> Ben.
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
--------------------------------------------------------
If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Click here for important additional terms relating to this e-mail. http://www.ml.com/email_terms/
--------------------------------------------------------
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net