On Sat, Dec 28, 2019 at 10:31 PM Richard Damon <rich...@damon-family.org> wrote:
> Every value of the type float, except NaN and perhaps +inf and -inf > (depending on which version of the Real Number Line you use) IS actually > a representation of a Real Number (so I don't understand in what way you > can say they aren't "numbers"). And yes, they happen to also be Rationals. > This is not subtle, and it is not something you do not understand. C'mon. Tell me three Real Numbers (or Rational Numbers) such that: (a + b) + c != a + (b + c) You will not succeed in that endeavor because of the nature of "numbers." ... and yes, because of the usual meaning given to the symbol '+', etc. OK... now I'll tell you three floating point "numbers" that follow that pattern: a = float("0.1") b = float("0.2") c = float("0.3") We can conveniently write the constructors for these in Python as `0.1` and so on. These objects that occupy computer memory are not "numbers" in the sense of obeying the axioms of arithmetic. But they kinda-sorta resemble numbers, and computers can do things with them quickly, so we pretend. -- Keeping medicines from the bloodstreams of the sick; food from the bellies of the hungry; books from the hands of the uneducated; technology from the underdeveloped; and putting advocates of freedom in prisons. Intellectual property is to the 21st century what the slave trade was to the 16th.
_______________________________________________ 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/NHYSG5O7GQRV5R44A4E77DVOGR2U62O2/ Code of Conduct: http://python.org/psf/codeofconduct/