Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: Behaviour of int() unexpected

by ikegami (Patriarch)
on Mar 11, 2025 at 00:19 UTC ( [id://11164227]=note: print w/replies, xml ) Need Help??


in reply to Re: Behaviour of int() unexpected
in thread Behaviour of int() unexpected

Perl normally uses double for floating point numbers, even on 32-bit machines. You can find out what your perl uses as follows:

$ perl -V:nvtype nvtype='double';

A double is an IEEE double-precision number on a desktop computer.

As such, 8.95 is actually stored as 0x1.1E66666666666 * 2^3 = 8.949999999999999289457264239899814128875732421875.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (2)
As of 2026-04-19 11:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.