Exact integer-valued floats

Hans Mulder hansmu at xs4all.nl
Sun Sep 23 03:45:33 EDT 2012


On 23/09/12 01:06:08, Dave Angel wrote:
> On 09/22/2012 05:05 PM, Tim Roberts wrote:
>> Dennis Lee Bieber <wlfraed at ix.netcom.com> wrote:
>>> On 22 Sep 2012 01:36:59 GMT, Steven D'Aprano wrote:
>>>> For non IEEE 754 floating point systems, there is no telling how bad the 
>>>> implementation could be :(
>>> 	Let's see what can be found...
>>>
>>> 	IBM 360: Same as Sigma-6 (no surprise; hearsay is the Sigma was
>>> designed by renegade IBM folk; even down to using EBCDIC internally --
>>> but with a much different interrupt system [224 individual interrupt
>>> vectors as I recall, vs the IBM's 7 vectors and polling to find what
>>> device]).
>> The Control Data 6000/Cyber series had sign bit and 11-bit exponent, with
>> either a 48-bit mantissa or a 96-bit mantissa, packed into one or two
>> 60-bit words.  Values were not automatically normalized, so there was no
>> assumed 1 bit, as in IEEE-754.
> 
> And it's been a long time (about 39 years), but as I recall the CDC 6400
> (at least) had no integer multiply or divide.  You had to convert to
> float first.

You didn't have to convert if your ints would fit in 48 bits.
If that was the case, then using the float multiply and divide
instructions would do the trick.

> The other oddity about the CDC series is it's the last machine I've
> encountered that used ones-complement for ints, with two values for zero.

Floats still have 0.0 and -0.0, even in IEEE-754.


Was Python ever ported to such unusual hardware?


-- HansM






More information about the Python-list mailing list