Re: Fastcode RoundTo
From: John Herbster (herb-sci1_AT_sbcglobal.net)
Date: 06/15/04
- Next message: John Herbster: "Re: QC RoundTo"
- Previous message: John Herbster: "Re: Fastcode RoundTo"
- In reply to: Dennis: "Fastcode RoundTo"
- Next in thread: Dennis: "Re: Fastcode RoundTo"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 15 Jun 2004 11:38:03 -0500
"Dennis" <marianndkc@home3.gvdnet.dk> wrote
> ... If it is then I will rename the challenge to RoundToEx. This means
> that we will have free hands to modify the functionality. ...
Dennis, et. al,
I forgot to mention what I think that the goals should be. Namely ...
These routines round input values to fit as closely as possible to an
output number with desired number of decimal fraction digits.
Because, in general, numbers with decimal fractions cannot be exactly
represented in IEEE-754 floating binary point variables, error limits
are used to determine if the input numbers are intended to represent
an
exact decimal fraction rather than a nearby value. Thus an error
limit
will be taken into account when deciding that a number input such as
1.295, which internally is represented 1.29499 99999 …, really should
be considered exactly 1.295 and that 0.29999 99999 ... really should
be interpreted as 0.3 when applying the rounding rules.
-- Regards, John Herbster (Support the movement to add floating and fixed decimal fraction numbers to the language.)
- Next message: John Herbster: "Re: QC RoundTo"
- Previous message: John Herbster: "Re: Fastcode RoundTo"
- In reply to: Dennis: "Fastcode RoundTo"
- Next in thread: Dennis: "Re: Fastcode RoundTo"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]