Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: HEX to floating point

by tachyon-II (Chaplain)
on Jun 16, 2008 at 14:13 UTC ( [id://692260]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # $h = unpack "H16", pack "d", 27.53152055;
    27.53152055  => e566 13bb 1188 3b40  
    ...
    
    # $h = reverse unpack "h16", pack "d", 27.53152055;
    # 403b8811bb1366e5
    
  2. or download this
    sub fix_endian {
        my $h = shift;
    ...
    01
    91
    403b 8811 bb13 66e4
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://692260]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-04-20 09:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found