On 12/28/19 11:44 PM, David Mertz wrote:
On Sat, Dec 28, 2019, 11:02 PM Chris Angelico <ros...@gmail.com <mailto:ros...@gmail.com>> wrote:

    They really truly ARE numbers. They are, in fact, these numbers:

    a = 3602879701896397 / 36028797018963968
    b = 3602879701896397 / 18014398509481984
    c = 5404319552844595 / 18014398509481984

    When you perform addition on these, the result must repeatedly be
    rounded to the available resolution. This is not about numbers, it
    is about limited subsets of numbers.


They really truly are NOT numbers. Numbers are not substantial things in themselves. They are defined by forming a field under two operators, '+' and '*'.

Often numbers are constructed, in a somewhat arbitrary way, from sets. A successor operation is defined in terms of subset, then we prove that that construction obeys the Peano axioms. Rationals can be constructed by defining a ratio or division operation, and that can be shown to create a field. Reals can be defined as Cauchy sequences of infinitely many Rationals, and they also define a field of weirdly convoluted sets.

You can construct these numbers in other ways. For example, you can create a FINITE field on bit-patterns of 32-bits, or 64-bits, or 42-bits, or whatever. However, the bit patterns used for IEEE-754 "numbers" are not ones that form a field. They are NOT NUMBERS under the meaning given to the operations '+' and '*' by computer chips and programming languages.

Now yes, you are free to say that NOTIONALLY you want to think of the bit pattern created by float("0.1") as standing for the Rational number 3602879701896397 / 36028797018963968. And that loose way of thinking is useful in the following way:

When you do the computer operation '+' on two bit patterns, you get a new bit pattern whose notional "number" is within a reasonably small delta of the number you'd get if you did an operation on Rational numbers. In fact, the maximum functional form of this delta is provided in the IEEE-754 spec.

But the bit patterns making up floating point "numbers" are not NUMBERS, and the operations performed on them do not make a FINITE field, let alone an isomorphism with the infinite field of Rational numbers.

But practicality beats purity, and practically, bit pattern CAN represent numbers. If you want to argue that floats are not numbers, than we can't use the statistics package, as we can't have any numbers to perform the statistics on.

Also, Number DO have a precise practical meaning. While we can start defining number as sets, and that provides a useful mathematical basis. We can also define the Natural numbers by simple counting. Two is a concert concept, it IS substantial. And from the concrete start we can get concrete definitions for the Rationals (which are actually enough to get to floats) and from the concrete definition of Rationals we can define the Reals by various methods where the numbers have REAL meanings, not just abstract concepts.

You seem to understand Pure Math, but not the Applied Mathematics of computers. The Applied Mathematics of Computing is based on the concept of finite approximation, which is something that Pure Math, like the type that builds up the Number line starting with Set Theory doesn't handle approximation well. In Pure Math, something that is just mostly true, and can be proved to not always be true, is considered False, but to applied math, it can be good enough.

--
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/TJS2E4HTEYHEC7FMZWJF3HBVHODMGAY5/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to