On Mon, Oct 14, 2019 at 07:53:07PM +1100, Chris Angelico wrote:
> On Mon, Oct 14, 2019 at 7:04 PM Andrew Barnert <abarn...@yahoo.com> wrote:
> > If you’re wondering whether integers are something you could define the 
> > laws of complex algebra over, then no, it isn’t. For example, one of the 
> > laws is that every number besides 0 has a multiplicative inverse, which 
> > obviously isn’t true for the set of integers. Or for the set of Python 
> > `int` values. But that’s not what the ABC is testing for, so that’s fine.
> >
> 
> Hmm, but every nonzero integer DOES have a multiplicative inverse -
> that value isn't another integer, but there is one. If the floating
> point value 2.0 has a multiplicative inverse 0.5, doesn't the integer
> value 2 also have that same multiplicative inverse?

It depends on whether you are working in the Integers only, or something else.

In the Integers, no, there is no multiplicative inverse for 2, because 
there is no *integer* (whole number) N such that 1/N = 2.

Analogy: you can't divide one apple between two people so that *both* 
people get a whole number of apples.

But in the Rationals, we allow additional values that cannot be 
expressed as whole numbers, namely the fractions. In the Rationals, 
there is a multiplicative inverse for all numbers except 0.

Likewise for the Reals.

Similarly there is no Real number X such that X*X = -1, but if you 
extend the values to Complex, there are two such values.


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

Reply via email to