On Sun, 18 Dec 2022 at 07:46, Paul St George <em...@paulstgeorge.com> wrote:
>
> Thanks to all!
> It was the rounding rounding error that I needed to avoid (as Peter J. Holzer 
> suggested). The use of decimal solved it and just in time. I was about to 
> truncate the number, get each of the characters from the string mantissa, and 
> then do something like this:
>
> 64550.727
>
> 64550 + (7 * 0.1) + (2 * 0.01) + (7 * 0.001)
>
> Now I do not need to!

It sounds like fixed-point arithmetic might be a better fit for what
you're doing.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to