Floating point numbers, was: Re: Digital
- From: Simon Clubley <clubley@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 16 Jul 2012 22:17:49 +0000 (UTC)
On 2012-07-16, Michael Kraemer <M.Kraemer@xxxxxx> wrote:
John Smith (who cares if I'm the one @ HP - if here's even still there)
Using floating point is probably fine if you are dealing with cash register
trnsactions of under a few hundred dollars/Euros. But trust me, hedge
funds/pension funds don't like being short-changed on deals of $250+ million
where the floating-point errors show up.
well, wouldn't double precision do the job?
16 decimal digits should be enough to express
even the US national debt, no?
And if this is not enough, modern C/C++
supports long double (128bit) as well.
Have you done any accounting work ?
The problem is that a floating point number is a approximation. This does
not matter in many scientific/technical problem domains but it does matter
in accounting. When it comes to accounting you want to represent numbers
in a format which is _guaranteed_ to be exact.
The usual candidate is some form of fixed point representation.
Simon Clubley, clubley@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Microsoft: Bringing you 1980s technology to a 21st century world
- Prev by Date: Re: Digital
- Next by Date: Re: [OT] Nameless DEC resellers :-), was: Re: Poulson 6 times more powerful than Tukwilla?
- Previous by thread: Re: Digital
- Next by thread: Re: Floating point numbers, was: Re: Digital