float bit strings

Peter Scott peter at PSDT.com
Fri Sep 20 11:58:24 CDT 2002


(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/




More information about the Victoria-pm mailing list