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

Re: Lesson Learned: not all 32b perls are created equal

by ikegami (Pope)
on Sep 30, 2017 at 21:43 UTC ( #1200432=note: print w/replies, xml ) Need Help??

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 (Prior) 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...

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2020-06-04 18:43 GMT
Find Nodes?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?

    Results (35 votes). Check out past polls.