RE: A Warning on Meaningless Additions (Was: Re: A funny thing about e)

2001-03-16 Thread David Whipp
> > perl -le '$n=1; print "$n \t",((1 + (1/$n))** $n) while $n*=1.001' > > [...] > > When to throw away > > a result as meaningless is certainly an important piece of wisdom, > > I do not know any programming languages that do it for you > > -- issue a warning when you've overloaded your accura

A Warning on Meaningless Additions (Was: Re: A funny thing about e)

2001-03-16 Thread David L. Nicol
What, exactly, would be warned against? Addition of something that is too small to cause a change in the result would be easy to check for, it could be made part of the addition routine; if warnings are on, issue a warning when $d != 0 and ($c + $d) == $c this could be checked before the op