thatmguy has asked for the wisdom of the Perl Monks concerning the following question:
I am looking for a way to convert or otherwise have $var3 recognized as 208.19565 and not an integer like 1129329174. Anyone have an idea? Thanks!my $var1 = 17232; # really 0100001101010000 my $var2 = 12822; # really 0011001000010110 my $var3 = $var1 << 16 | $var2; # 01000011010100000011001000010110
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: 32bit float from two halves
by Anonymous Monk on Aug 10, 2016 at 00:00 UTC | |
by thatmguy (Initiate) on Aug 10, 2016 at 21:08 UTC | |
|
Re: 32bit float from two halves
by hexcoder (Curate) on Aug 10, 2016 at 21:16 UTC | |
by thatmguy (Initiate) on Aug 10, 2016 at 22:42 UTC | |
by Anonymous Monk on Aug 10, 2016 at 23:02 UTC | |
by thatmguy (Initiate) on Aug 11, 2016 at 00:30 UTC | |
by FreeBeerReekingMonk (Deacon) on Aug 11, 2016 at 12:15 UTC |