Re: This calculation is just wrong / computer can't count!
- From: "BobF" <rNfOrSePeAzMe@xxxxxxxxxxx>
- Date: Sun, 7 Oct 2007 05:44:51 -0500
David - You might try "guard bits". That's a method that's been used in the
past. It's the old trick where you divide 10 by 3, see .333333333, then
multiply by 3. Sometimes you would see .999999 and sometimes you would see
10. Those that displayed 10 were said to employ guard bits.
The methods may have changed over the years, but it should get you on the
trail.
"David Ching" <dc@xxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:4RYNi.918$R95.474@xxxxxxxxxxxxxxxxxxxxxxx
I want to ask: can anyone recommend a library that produces results like a
calculator (I believe it is called fixed precision decimal)? I understand
that the floating point types in C++ are not meant for this, but what
search terms do I google to find a library that offers this functionality?
I had thought BCD (binary coded decimal) would be a good start, but there
isn't anything on sourceforge, for example that has this....
Thanks,
David
.
- Follow-Ups:
- Re: This calculation is just wrong / computer can't count!
- From: Joseph M . Newcomer
- Re: This calculation is just wrong / computer can't count!
- From: David Ching
- Re: This calculation is just wrong / computer can't count!
- References:
- This calculation is just wrong / computer can't count!
- From: GT
- Re: This calculation is just wrong / computer can't count!
- From: AliR \(VC++ MVP\)
- Re: This calculation is just wrong / computer can't count!
- From: GT
- Re: This calculation is just wrong / computer can't count!
- From: Luke alcatel
- Re: This calculation is just wrong / computer can't count!
- From: GT
- Re: This calculation is just wrong / computer can't count!
- From: Joseph M . Newcomer
- Re: This calculation is just wrong / computer can't count!
- From: David Ching
- This calculation is just wrong / computer can't count!
- Prev by Date: Re: Multi-thread UI program cause modal dialog showing behind main frame
- Next by Date: Re: Timerproc exception
- Previous by thread: Re: This calculation is just wrong / computer can't count!
- Next by thread: Re: This calculation is just wrong / computer can't count!
- Index(es):
Relevant Pages
|