Steven D'Aprano <steve+pyt...@pearwood.info> added the comment:

Aiden: in the future, please do not post unnecessary screenshots of text. They 
are hostile to the blind and slight-impaired, they make it impossible to copy 
your code and run it ourselves, and they cannot be searched for.

Instead, copy and paste the text demonstrating the code and the results:

py> 11/3
3.6666666666666665


Thank you.

Zachary: while the rest of your comments were excellent, please don't tell 
people that Decimal is "exact". Decimal is a floating point format just like 
floats are, and so suffers the same kinds of rounding errors as binary floats. 
In fact, Decimal often suffers from larger rounding errors than binary, which 
is why serious numeric data scientists still use binary float.

The advantages of Decimal over binary float is that you can configure how much 
precision is used, and that any number you can write out exactly in base 10 can 
be represented exactly as a Decimal. But it still has to round off values which 
cannot be represented exactly as Decimals.

----------
nosy: +steven.daprano

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36151>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to