float bit strings

abez abez at abez.ca
Fri Sep 20 12:25:48 CDT 2002


IEEE representation of 0 is 0^32, this is denormalized form.
1st bit sign
next 8 bits exponents with bias of 127 subtracted 
next 23 bits the the mantissa
There is an implied extra bit infront of the mantissa.

On Fri, 20 Sep 2002, Peter Scott wrote:

> (Per question last night)
> 
> Well, I *thought* this was the way:
> 
> % perl -le 'print unpack"b*",pack "f*",3.14159'
> 00000010100100101111000000001011
> 
> 
> But I don't understand this:
> 
> % perl -le 'print unpack"b*",pack "f*",0'
> 00000000000000000000000000000000
> 
> That's not right, is it?
> 
> Looks right for other cases, though.
> --
> Peter Scott
> Pacific Systems Design Technologies
> http://www.perldebugged.com/
> 

-- 
ABeZ------------ ------- ------ - ---------- -- ------------
http://www.indexdirect.com/abez/ Abram Hindle (abez at abez.ca)
---- ------- ----------- ----------- - - ------ --------ABeZ




More information about the Victoria-pm mailing list