Re: Fastcode RoundTo replacement
- From: Max <nospam@xxxxxxxxxx>
- Date: Sun, 30 Oct 2005 14:03:23 +0100
John Herbster wrote:
"Max" wrote
there are offered these replacements in RoundToEX_JOH.pas: ... Which is recommended?
The original RoundTo() that came with D6 or D7 has problems. Same are noted in still open QualityCentral report #8070.
Perhaps, stating the definition of what the RoundTo function
is supposed to be doing (either by words or code) would be a good place to start.
Beyond, what was originally noted in the #8070 report, note that the ADigit in function RoundTo
(const AValue: Double; const ADigit: TRoundToRange): Double;
which is defined as
type TRoundToRange = -37..37;
was probably meant to be type TRoundToRange = -27..27;
because 10 raised to the 37th power cannot be exactly represented in the data type extended. The highest that can exactly be represented is 10 raised to the 27th power.
Regards, JohnH
Can I use RoundToEX_JOH with Double's too? .
- References:
- Re: Fastcode RoundTo replacement
- From: John Herbster
- Re: Fastcode RoundTo replacement
- Prev by Date: Re: Status of Direct Calling Libraries
- Next by Date: Re: FastCode MM B&V 0.54
- Previous by thread: Re: Fastcode RoundTo replacement
- Next by thread: Webmaster - All Direct Calling Libraries is missing
- Index(es):
Relevant Pages
|