On Sat, Dec 6, 2008 at 4:32 PM, Wacek Kusnierczyk <
[EMAIL PROTECTED]> wrote:

> Stavros Macrakis wrote:
> > On Sat, Dec 6, 2008 at 5:02 AM, Wacek Kusnierczyk <
> > [EMAIL PROTECTED]> wrote:
> >> yepp, though (2/3)*3 not evaluating to 2 is again not a must, is it.
> > Why is that less a must than .3-.2 == .1?  On the contrary, the computing
> > convention (and for that matter the usual scientific and engineering
> > convention) is that a decimal point signals an approximate number.
> not a must, since no floating point arithmetic has to be involved here.
>

Floating-point is not the issue here.  Fixed point is just as bad.  The
problem is that it is a binary fraction, not a decimal fraction.  It is
perfectly possible to do decimal arithmetic in computers, and it is useful
for commerical, but not scientific/engineering calculations.

> Yes, Scheme uses standard (correctly rounded) IEEE floating point, but of
> course other cases like 15.0/22.0*22.0 are not exact.

(* (/ 2.0 3.0) 3.0) is not exact either, as aren't (* (/ 2.0 2.0) 2.0)
> and 2.0; this was a teaser ;)
>

Actually, they *are* all exact in any system using IEEE floats.

> No, I don't think that's the correct way to think about it.  I believe
that
> the R spec says (or should say) that "numeric" means IEEE double-precision
> floats, with all that that entails: range restrictions, precision,
rounding
> rules, NaNs, etc.

maybe.
>

Some other language systems have tried other approaches to specifying float
accuracy.  For example, the original Ada spec had its own floating-point
error model, which allowed a greater range of results to be considered
"correct".


> > Sounds like a pretty naive claim...
>
> to be fair to the referred to post, it went:
>
> "One of the key design features of R is that it hides implementation
> details from users. They are free to think about the substantive issues
> with their data rather than worrying about computational trivia."
>

This is just puffery: *"Puffery* as a legal
term<http://en.wikipedia.org/wiki/Legal_term>refers to promotional
statements <http://en.wikipedia.org/wiki/Advertising> and claims that
express subjective <http://en.wikipedia.org/wiki/Subjectivity> rather than
objective <http://en.wikipedia.org/wiki/Objectivity_%28journalism%29> views,
such that no reasonable person would take literally." (Wikipedia)

Every language claims that it is a better level of abstraction for users'
problems and hides the "computational trivia" from the user.  R certainly
abstracts from a lot of "computational trivia" that you'd have to deal with
in Fortran or C, but in the end you can't take these things too literally.

             -s

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to