Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: Yet again: floats are not expressed accurately

by bliako (Monsignor)
on Mar 21, 2023 at 13:04 UTC ( [id://11151100]=note: print w/replies, xml ) Need Help??


in reply to Re: Yet again: floats are not expressed accurately
in thread Yet again: floats are not expressed accurately

granted! (for versions).I just went to the bank because I needed 226 drachmas but decided to draw 2.26 at a time... as these are thought experiments I am a at a loss as to how much i have in my pocket and how much still in my account...

  • Comment on Re^2: Yet again: floats are not expressed accurately

Replies are listed 'Best First'.
Re^3: Yet again: floats are not expressed accurately (updated)
by LanX (Saint) on Mar 21, 2023 at 13:28 UTC
    Don't be so drachmatic!!! ;P

    Some languages (raku?) are trying to solve the issue by having a number type for fractions°. Hence integer operations behind the scenes.

    And that's what you should do with your West Asian island coins.

    Add them as integers and move the point afterwards.

    Sorry, we had this discussion already so often that I'm not too motivated to further discuss it.˛

    FWIW

    °) there was a pragma to turn scalars into slow objects doing just this.

    use fract or something...

    Updates

    https://perldoc.perl.org/bigrat but it doesn't seem to support dot-notation...

    ˛) See https://floating-point-gui.de/ for more.

    Cheers Rolf
    (addicted to the 𐍀𐌴𐍂𐌻 Programming Language :)
    Wikisyntax for the Monastery

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-25 20:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found