http://www.perlmonks.org?node_id=1200432


in reply to Lesson Learned: not all 32b perls are created equal

C doesn't provide operators to perform bitwise operations on floats (because processors don't provide those either), and Perl doesn't go out of its way to add support for that.

It did recently add support for hexadecimal floats, though!

$ perl -e'CORE::say sprintf "%a", 9/10' 0x1.ccccccccccccdp-1 $ perl -e'CORE::say 0x1.ccccccccccccdp-1' 0.9

Replies are listed 'Best First'.
Re^2: Lesson Learned: not all 32b perls are created equal
by pryrt (Abbot) on Sep 30, 2017 at 22:14 UTC

    It was a case of subconsciously expecting DWIM, and since it passed my 100%-coverage tests with 32bit perl, I thought it did DWIM

    Yes, I saw the %a soon after releasing that project... defonitely a welcome addition. Some day, I might have my module use the builtin on modern perls, but I'll have to see whether it has all the features I want...