Re: This calculation is just wrong / computer can't count!
- From: "Alexander Grigoriev" <alegr@xxxxxxxxxxxxx>
- Date: Mon, 8 Oct 2007 21:04:26 -0700
I'm sorry to disappoint you, but the computer doesn't do rounding in decimal
digits. It does rounding in binary digits. Then whatever gets printed is
just a decimal representation of the rounded binary fractional number. I'm
sorry, but in computational math you don't deal with computational error in
terms of decimal digits, they are only used in simplified rules that an
elementary school student could understand.
You use relative error, which may not map into a particular digit. If you
want nice looking result, you just need to discard any decimal positions
that can be polluted by a calculation error. To choose number of significant
decimal digits is up to you. If you feel that lat '7' is wrong in this
particular calculation, just print one less digit.
"GT" <ContactGT_remove_@xxxxxxxxxxx> wrote in message
news:017b6d06$0$20663$c3e8da3@xxxxxxxxxxxxxxxxxxxx
One problem here is everyone seems to be banding around the words precise
and accurate - they have different meanings. Precision is the number of
detail in something - the number of decimal palces. Accuracy is how
*correct* something is. Example; 0.83 is accurate (mathematically
correct), but not very precise. 0.83333333333337 is very precise, but not
accurate or in other words mathematically 'wrong'. I don't need my
intermediary calculations stored to a high level of precision (only
require calculations to work to 6 or more digits), but I need these
calculations to be accurate (mathematically correct). If you base a series
of calculations on a fundamentally flawed number, then once it has been
squared a few times and multiplied / divided by some other numbers that
are incorrect beyond the 16th digit, then the calculations starts to
display problems. The algorithm works perfectly on paper and when run
through a calculator, but not when programmed in C++.
.
- Follow-Ups:
- 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: Les
- Re: This calculation is just wrong / computer can't count!
- From: GT
- Re: This calculation is just wrong / computer can't count!
- From: Les
- Re: This calculation is just wrong / computer can't count!
- From: GT
- Re: This calculation is just wrong / computer can't count!
- From: Les
- Re: This calculation is just wrong / computer can't count!
- From: GT
- Re: This calculation is just wrong / computer can't count!
- From: .rhavin grobert
- Re: This calculation is just wrong / computer can't count!
- From: GT
- Re: This calculation is just wrong / computer can't count!
- From: .rhavin grobert
- Re: This calculation is just wrong / computer can't count!
- From: GT
- Re: This calculation is just wrong / computer can't count!
- From: .rhavin grobert
- Re: This calculation is just wrong / computer can't count!
- From: GT
- This calculation is just wrong / computer can't count!
- Prev by Date: Re: This calculation is just wrong / computer can't count!
- Next by Date: Re: Is there a Java version of CHtmlEditView
- 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
|