in reply to Re: Converting binary to double precision (big-endian)
in thread Converting binary to double precision
In my case, this was the correct answer. I needed to switch from big to little-endian. It's amazing how little there is on the internet on this subject. Hopefully this will help future users.
my $n = pack 'H16', '3f0df9673344c570';; printf "Big\n"; print unpack ("d", scalar reverse $n); #Big #5.71713084433029e-05 printf "\nLittle\n"; print unpack ("d",$n); printf "\n"; #Little #1.69044404965372e+235
|
|---|