Re: What is RoundToEx?
- From: "Q Correll" <qcorrell@xxxxxxxxxxxxx>
- Date: 27 Dec 2007 10:38:44 -0700
Dennis,
| You suggest we use this algorithm
|
| Result := Round(Input*100)/100;
|
| How does that compare to the one we use?
|
| Result := Round(AValue / LFactor) * LFactor;
|
| And what are the differences regarding precision?
If one had infinite precision it would not make any difference.
However, with fixed register(s) of any given length, the formula
presently used, in simple terms, can "lose" precision with the
parenthesized divide and that "error" is then "amplified" by the
post-multiply.
John's suggested formula "increases" [precision] accuracy with the
parenthesized multiply before the post-divide "loses" some of it.
--
Q
12/27/2007 10:31:42
XanaNews Version 1.17.5.7 [Q's Salutation mod]
.
- Follow-Ups:
- Re: What is RoundToEx?
- From: Anders Isaksson
- Re: What is RoundToEx?
- References:
- What is RoundToEx?
- From: John Herbster
- Re: What is RoundToEx?
- From: Dennis
- Re: What is RoundToEx?
- From: John Herbster
- Re: What is RoundToEx?
- From: Dennis
- Re: What is RoundToEx?
- From: Dennis
- What is RoundToEx?
- Prev by Date: Re: Nexus VS FastMM4
- Next by Date: Re: What is RoundToEx?
- Previous by thread: Re: What is RoundToEx?
- Next by thread: Re: What is RoundToEx?
- Index(es):
Relevant Pages
|