A use for integer quotients
Robin Garner
robin.garner at i.name.com
Tue Jul 24 22:08:41 EDT 2001
"michael" <serrano at ozemail.com.au> wrote in
news:JDa77.97061$Rr4.549007 at ozemail.com.au:
>
>> Not formally, AFAIK. For example, 3 with no decimal point following
>> could be anything from 2.5 to 3.4. If I remember correctly, to be
>> fussy about it, you would need to specify 3.00/4.00 to get 0.75 or am
>> I missing something or misremembering my ancient maths courses ;) ?
>>
>
> I'm pretty sure that mathematicians say that
> three, 3, 3.00, iii
> are different numerals for the same number.
> This number is a real number, a rational number, an integer, and a
> natural number.
In most maths the sets are made explicit, and operators are defined as
functions with specific domains. There are standard embeddings of Integers
into Rationals and Reals, and if you are working with real numbers, then 2
and 2.0 are generally taken to stand for the same thing. But strictly
speaking the Integer 2 and the Real Number 2 are different entities. You
would be hard pressed to find anyone writing the natural number 2 as 2.0.
Since the Integers aren't a field, there isn't a generally accepted
function
/ : Int x Int -> Int.
that agrees with the function
/ : Real x Real -> Real
for all (a,b) where b is divisible by a.
>> More importantly, the thing everyone is talking about here is an
>> integer operation yielding a real (float) result. Isn't this kind of
>> a "no-no" amongst mathematicians?
>
> I'm not sure whether the "inner product" from vector algebra could be
> considered an "operator", but it does operate on vectors and yields a
> scalar.
>
The proposed division operator is a perfectly well defined function of type
Int x Int -> Real. You can define it rigorously as the composition of the
standard embedding e: Int -> Real with the division function on the reals.
Mathematics is full of functions from one set to another.
Of course appealing to Mathematical objects has its limitations, since the
computer Int and Float types are not the same as Integers and Reals in
mathematics, because a) they are finite sets and b) the Reals have finite
precision.
And very few things (except perhaps fallacious arguments) are '"no-no"s
amongst mathematicians'. The computer integers are variously studied as
GF(2^32), the Galois Field of 32 direct products of {0,1}, the ring of
integers modulo 2^32, a (rather uninteresting) finite topological space etc
etc etc.
>>
>> Maybe I'm wrong here...
>
>
>
>
More information about the Python-list
mailing list