Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

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

by ikegami (Patriarch)
on Sep 30, 2017 at 21:43 UTC ( [id://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 (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...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2024-04-24 11:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found