Help for this page

Select Code to Download


  1. or download this
        my $num = 1.2345;
    
        print join(" ", map { sprintf "0x%02x", $_ } 
                        unpack("C*", pack "f", $num)), "\n";
    
  2. or download this
        my $num = unpack "f", reverse $packed_num;
  3. or download this
        use POSIX 'ldexp';
    
    ...
    
            return $num;
        }