PEP0238 lament
Steve Horne
sh at ttsoftware.co.uk
Mon Jul 23 14:15:35 EDT 2001
On 23 Jul 2001 15:56:30 GMT, Marcin 'Qrczak' Kowalczyk
<qrczak at knm.org.pl> wrote:
>Mon, 23 Jul 2001 13:50:51 +0100, Steve Horne <sh at ttsoftware.co.uk> pisze:
>
>> It's not a different operation on the same data. It's the same
>> operation on a different datatype.
>
>No, it's different operation on the same data, as long as we agree that
>"same data" means "Python's '==' holds".
> 3.0 == 3
> 2.0 == 2
> 3.0/2.0 != 3/2
Nah - it only looks like it holds because of the implicit type
coercion.
>> You might as well claim floating point addition is different from
>> integer addition - that also requires a different algorithm and gives
>> a different result.
>
>They give the same result, except a very small rounding error
>sometimes, and except where the integer addition doesn't give any
Ever worked with a chaotic system? Remember the butterfly and the
hurricane? That small error can get big very quick using nothing but
multiplies and additions - division is nowhere near as special as
people think it is. If I want approximations I'll ask for them.
--
Steve Horne
Home : steve at lurking.demon.co.uk
Work : sh at ttsoftware.co.uk
More information about the Python-list
mailing list