The stupid question is the question not asked | |
PerlMonks |
Re^3: Yet again: floats are not expressed accurately (updated)by LanX (Saint) |
on Mar 21, 2023 at 13:28 UTC ( [id://11151101]=note: print w/replies, xml ) | Need Help?? |
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...
Updateshttps://perldoc.perl.org/bigrat but it doesn't seem to support dot-notation... ˛) See https://floating-point-gui.de/ for more.
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|