Hacker News new | ask | show | jobs
by symic 1104 days ago
In third grade parlance it is correct to say computers struggle with too many digits.
2 comments

They don't "struggle". Computers exhibit definite behavior when a program attempts to store or operate on numbers that are too large for the allocated space.

For integers, overflow behavior is pretty easy to understand.

Obviously I know this. As stated, in 3rd grade parlance it’s appropriate to say “they struggle”. Have you ever heard someone say, “I need a new computer; mine’s dying.”? This level of pedantic nitpicking is not appropriate for 3rd graders. I’ve heard professional programmers say that their computer struggles with compiling certain programs they are working on. Colloquialisms can be useful and they are ubiquitous.
It would be more accurate to say that calculating with very large integers or integer fractions with millions of digits can be slow on current computers - but it's still far beyond what humans can typically do without assistance.

Million-digit numbers are absurdly large in terms of physical quantities, but can easily arise when one is enumerating possibilities, such as the number of ways that one could give out randomized phone numbers to everyone in a city.

(That's the sort of explanation that my mathematically-inclined friends and I would have understood in grades 3-5, when we learned about integers, rational and irrational numbers, and basic probability/combinatorics, as well as simple algorithms for multi-digit arithmetic and conversion between integer and decimal fractions.)

Factorial and exponential functions were (and are) fun to play with on calculators because of the large numbers you can generate; python and mathematica are even more fun of course. I think recent TI and Casio graphing calculators support python, though I don't know about their bignum support or memory limits.

I think you missed that my comment was about explaining something to third graders or don’t understand what it means to explain something to people in that age group.
Even as a third grader I appreciated clarity and accuracy (as did my classmates.)
Not the allocated space, the bit width of the ALU. Besides, your explanation doesn't add anything to the description of 'struggle' beyond 'in a normal and expected fashion'.
Not sure what "struggle" or "too many" is supposed to mean, but my laptop (running Python in a Linux VM) handles million-digit numbers just fine

    >>> a=10**(1000000)
    >>> b=a//3
    >>> len(str(b))
    1000000
Given that computers have calculated the value of Pi to more than 60 million digits , I think we can safely say that computers readily handle numbers with many digits.
A computer can’t display more digits than the number of particles in the observable universe. This is a finite number. As such it is correct to say that computers struggle if the number of digits is too large. While for practical uses modern computers don’t struggle with finite integers one normally encounters they do struggle with precision in certain circumstances. For 3rd graders I think it’s OK to introduce them to the concept that computers, like all devices, have limitations.
> A computer can’t display more digits than the number of particles in the observable universe. This is a finite number. As such it is correct to say that computers struggle if the number of digits is too large

There are two sources of error here:

1. Your interpretation is essentially "computers struggle to complete tasks that are impossible for them to complete" - a meaningless tautology. At best it is "nothing scales infinitely" which perhaps is a bit more useful as a refutation for complaints that something "doesn't scale" in an unlimited fashion, but that doesn't seem to be the context here.

2. "Too large" is ambiguous. If it's "too large for computers to handle" then it devolves into the above meaningless tautology. However, a sensible and common interpretation would be to interpret "if <something> is too large" as "if <something> is very large" - but we know that computers can in fact handle numbers with huge digit counts (somewhere between 1 and 60+ million.)

So the original statement is either a largely meaningless tautology or something that is misleading and/or incorrect. PP's criticism is valid.

I think you don’t tech professionally.
I teach professionally.

You don't need to tell kids things that are misleading nonsense. It only confuses them more. You can be precise and high level at the same time.

In no sense do computers struggle with digits. That's a misleading confusing statement and it's not appropriate at any age.

> I think you don’t tech professionally.

I don't know whether you mean "teach" or "tech" here, but this seems to be an ad hominem argument.

Regardless, I would submit that clarity and correctness matter both in teaching and in tech.

It’s not an ad hominem. It’s a polite way to suggest that you don’t know what you are talking about when it comes to teaching concepts to kids. I think it’s worth your while to wonder why it is so obvious that you are not a teacher. What experience and insights regarding age appropriate explanations are you missing that make it so obvious that you don’t teach?

Correctness, of the sort you are implying are absolutely not appropriate at all levels. There’s a reason kids in second grade are told that you can’t subtract a larger number from a smaller one, for instance.