A use for integer quotients

Stephen Horne steve at lurking.demon.co.uk
Mon Jul 23 19:05:12 EDT 2001


On Mon, 23 Jul 2001 21:34:51 GMT, bokr at accessone.com (Bengt Richter)
wrote:

>On Mon, 23 Jul 2001 19:15:33 +0100, Steve Horne <sh at ttsoftware.co.uk> wrote:
>[...]
>>
>>Fixed point arithmetic emulated by using integers with a scale factor,
>>though, works very nicely. Better still when there's a language
>>feature to do this automatically, but if we added fixed point types to
>>Python we'd need *another* division operator - four so far including
>>the rational one ;-)
>>
>This reminds me, is Python configurable to run on a platform with no
>floating point support?

I believe so - there was even a Python for Psion palmtops at one
point, and the 3 series certainly doesn't have hardware floats.

All it requires, I imagine, is that the C or C++ (not sure which)
compiler that you build Python on must have a correctly implemented
'double' type - the implementation of the floats in software or
hardware should be irrelevant bar performance concerns.

Linux Python is distributed both as source and as binary, and a source
distro will compile and install itself with very little fuss if you
know the basics of Linux. It should just install and work.




More information about the Python-list mailing list