>But at some point it has to happen, whether u do it urself
>in some code or the arithmetic engine does it on its floats.
Understood. But the difference is that computers round beyond where we
humans generally care about. Not that it's actually rounding--as you
pointed out in another post--but just the nth digit in an n-precision
representation. (Kind of makes you wonder what's lurking at n-plus-one,
doesn't it?) Most programmer-performed rounding comes at the *end* of the
computation (where, incidentally, it belongs), when we need to round a
number to a reasonable, usable value.
For example, using a few dozen digits of pi, say
3.14159265358979323846264338327950288419716939937510, is probably not going to
make a difference unless you're piloting a moon
rocket, where you might even want to use an "unrounded" value. Most of us
on earth are satisfied with, and able to use successfully, a value of
3.14159. OTOH, rounding pi to 3.142 is probably not a good idea, even for
terrestrial apps. Remember when one state (Kansas, Nebraska, or Arkansas,
I think it was) wanted to declare pi = 3, which would've made all the
wheels in the state turn square overnight? Srt f lk wht wer dng 2 Nglsh
<giggle, snerk, chortle>.
See the Wikipedia article on rounding at http://en.wikipedia.org/wiki/Rounding
for an interesting discussion on the principles and pitfalls of rounding.
Speaking of pi, does anyone need a thousand-dp value of it? How about a
million-dp value? I have one of each available, but I won't post them
here.... A caveat, though: they're text values in Word doc
files--converting them to numbers is your problem! (Good luck wit dat,
Cholly!) Or, to impress your friends, you could use 355/113, good to six
dp (http://www.math.hmc.edu/funfacts/ffiles/10004.5.shtml).
Deane Rothenmaier
Programmer/Analyst
Walgreens Corp.
847-914-5150
"I am but mad north-north-west. When the wind is southerly I know a hawk
from a hand-saw" -- Hamlet (Act II, scene ii)
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs