develooper Front page | perl.perl5.porters | Postings from February 2001

Re: IV preservation (was Re: [PATCH 5.7.0] compiling on OS/2)

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
February 17, 2001 09:45
Subject:
Re: IV preservation (was Re: [PATCH 5.7.0] compiling on OS/2)
Message ID:
20010217174547.B2065@plum.flirble.org
On Sat, Feb 17, 2001 at 05:14:25PM +0000, nick@ing-simmons.net wrote:
> Strictly speaking true. But as "minimum" float and double ranges
> fit in exactly 32 and 64 bits respectively, with the 
> sign, exponent, (hidden MSB), mantissa as per IEEE then in practice the 
> only difference is big/little endian style ordering of the fields.

Except for the (now being replaced) ARM layout, where the bits in each words
are little endian, but the two words are written to memory in a "big endian"
order. legal (I am told). weird. Trips some programs up. But so do structures
with packing, and integer pointers needing to be aligned.

> So it is almost always
> 
> struct
> {
>  int sign : 1;
>  int exponent : X;
>  int ms_mantissa : 
>  int ls_mantissa;
> }
> 
> The problem machines are IBMs and VAXs which pre-date 80387/IEEE which became
> de-facto standard.  

quite. "almost".

Nicholas Clark

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About