On Fri, Jan 23, 2015 at 9:59 PM, Steven D'Aprano
<steve+comp.lang.pyt...@pearwood.info> wrote:
> I don't think that a raise of 0.10000000000000001 (10%),
> 0.035000000000000003 (3.5%) or 0.070000000000000007 (7%) is quite what
> people intended.
>
> :-)

I also don't think it'll make any appreciable difference, especially
if the actual salary is stored as an integer :-)

> (Don't use binary floating point numbers for anything related to money. Just
> don't.)

While I generally agree, it's not quite as hard-and-fast as that. It's
just important to know that binary floating point can't accurately
represent many commonly-used real numbers... the same consideration
that they always need.

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

Reply via email to