in reply to Re^5: Behaviour of int() unexpected
in thread Behaviour of int() unexpected
I should have mentioned that any periodic number can be represented loss free as fraction, and vice versa.
(I already covered this in school in 7th or 8th grade but curriculums may vary.)
So, within the boundaries of integer precision you can have loss free calculations.
But with some overhead for normalization. (I suppose they can't be delayed ...🤔 ;)
This could be sufficient for financial applications, though I'd rather prefer to calculate with the smallest unit in integer. ( Like cent, or deci-cent or whatever depending on legal specifications)
Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery
|
---|