On 12/29/19 9:46 PM, Chris Angelico wrote:
On Mon, Dec 30, 2019 at 1:40 PM Andrew Barnert <abarn...@yahoo.com> wrote:
On Dec 29, 2019, at 18:20, Chris Angelico <ros...@gmail.com> wrote:
On Mon, Dec 30, 2019 at 11:47 AM Steven D'Aprano <st...@pearwood.info> wrote:
On Mon, Dec 30, 2019 at 08:30:41AM +1100, Chris Angelico wrote:
Especially since it fails quite a few commonsense tests for whether or
not something is a number:
[...]
The answer in all four cases is No. If something doesn't quack like a
duck, doesn't swim like a duck, and doesn't walk like a duck, and is
explicitly called Not A Duck, would we insist that it's actually a duck?
Be careful: This kind of logic and intuition doesn't always hold true
even for things that we actually DO call numbers. The counting numbers
follow logical intuition, but you can't count the number of spoons on
a table and get a result of "negative five" or "the square root of
two" or "3 + 2i".
That's because none of those examples are counting numbers :-)
My set of "commonsense tests" weren't intended to be an exhaustive or
bulletproof set of tests for numberness. They were intended to be
simple, obvious and useful tests: if it quacks, swims and walks like a
duck, it's probably a duck. The silent Legless Burrowing Duck being a
rare exception.[1]
Exactly my point! Counting numbers follow logical intuition; but you
attested that you could use logical intuition to figure out if
something is a "number". Not a "counting number". Logical intuition
does NOT explain all the behaviours of non-counting numbers, and you
can't say "oh this is illogical ergo it's not a number". The logic of
logical intuition is illogical. :)
Counting numbers are intuitively numbers. So are measures. And yet, they’re
different. Which one is the “one true numbers”? Who cares? Medieval
mathematicians did spend thousands of pages trying to resolve that question,
but it’s a lot more productive to just accept that the intuitive notion of
“number” is vague and instead come up with systematic ways to define and
compare and contrast and relate different algebras (not just those two).
That's what I said. You cannot use intuition to define numbers unless
you're willing to restrict it to counting numbers. Therefore, if
intuition cannot define numbers, intuition cannot be used to exclude
non-numbers.
I don't know about you, but I can intuitively think of real numbers as
measures on a linear scale. Given the definition of an inch, I can think
of a distance of x inches, where x is some real number that I know. I
may be physically limited in the scale and precision that I can
physically create, but can imagine what it represents.
Are complex numbers numbers? Sure, if you want. Or no, if you prefer. But
they’re still not real numbers, much less natural numbers. That’s obvious, and
nearly useless. What you really want to know is which properties of the reals
also hold of the complex numbers, and that’s a lot less obvious and a lot more
useful.
And the same is true for IEEE binary64. You can say they’re not numbers, or
that they are, or that some of them are and some of them aren’t, but they’re
not the rationals (or the reals or the affinely extended reals or a subalgebra
of any of the above); what you really want to know is which properties of the
rationals hold under what approximation regime for the IEEE binary64s.
And the same is true of the debate about float("nan"). You cannot use
intuition to figure out whether this is a number or not, because
intuition has ALREADY failed us. "Commonsense tests" such as Steven
put forward are not a valid way to debate the edge cases, because they
fail on what we would consider clear cases.
ChrisA
Maybe YOUR intuition has failed to handle practical real numbers. Mine
handles it fine. Maybe the difference between an Engineer and a
mathematician.
I will also add that since the Standard that defines them is fairly
clear that they are not numbers for you to call them numbers puts the
onus on YOU to show that they should be.
Now, I suppose that if you look at things differently, we could call
them 'Numbers' in the sense that the first group of values, the finite
numbers, are numbers in the Real Numbers, but the infinities aren't, but
if you move your number system to the Extended Real Numbers then we can
add the infinities (but in extending the number system, we lose some
properties), we could further extend the number system to some Nan
Number System that includes the NaNs, but in doing that we lose even
more properties. The one issue is that this new invented number system,
being an invented rare bird, can't be assumed when most people say 'Number'.
The proper term that most people use is a floating point value or
representation.
--
Richard Damon
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/python-ideas@python.org/message/C7LRDXY7TL725CZOIDFTKFQLPMV5CEUF/
Code of Conduct: http://python.org/psf/codeofconduct/