On Wed, 2009-09-23 at 15:23 -0500, Brian Mastenbrook wrote:
> Once again, I'm not understanding why bignums are so difficult that
> they can't be expected from an implementation.
Nobody's talking about them being difficult to implement,
or talking about not providing them. I just don't want to use
them *accidentally*, particularly with ratios, because I hate it
when what ought to be a simple computation consumes all memory,
slows down to a snails pace, and then crashes, and then I have
to go back and modify code to *specifically* use inexact numbers
in order to get an answer.
I also hate it when I get numbers several lines long and,
without counting hundreds of digits, I can't even tell what the
heck value they are close to. Again, I have to go back and modify
code to specifically use inexact numbers, just to get a readable
result with an explicit exponent. Alternatively, I have done things
like set my window width to exactly 20 characters, just so I can
tell how many digits something is without counting all of them.
If you like that demo with 100 factorial, ask sometime how many
of your students can tell at a glance, even to the nearest order
of magnitude, what the heck number that result actually is? My
eyes count up to 20 digits or so easily, just by seeing a number;
but with 158 it takes me a laborious minute of counting digits
one-at-a-time before I even know what the value is! If I just
saw the integer result, and you asked me what it was, I'd probably
be off by several orders of magnitude at least, and that's just
not an acceptably accurate idea of the value.
For the relatively few applications (crypto, number theory) where
I want to unleash a bignum computation, I'm happy for that to be
the special case that I have to ask for specifically. Otherwise
I very seldom want more than hundred-decimal accuracy, and even
when I need that much (long term orbital calculations over thousands
of years?) I certainly don't want thousand-decimal accuracy.
I'm actually somewhat amazed that so many people apparently
are routinely working with applications in which hundreds of
decimals of precision are relevant and useful. And also amazed
that you can apparently easily see the two-orders-of-magnitude
difference between 156-digit and 158-digit numbers, or tell
which of two ratios, each hundreds of characters long, is
greater.
Anyway, precedent is with you on this one, so let R7 continue to
not distinguish bignums semantically in any way outside of vector
indices. I will continue to curse and go back to modify code to
use inexact numbers when I want readable results, tractable
runtimes, and non-crashing programs.
Bear
_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss