David Wolever - Floats are Friends: making the most of IEEE754.00000000000000002 - PyCon 2019

Поделиться
HTML-код
  • Опубликовано: 13 сен 2024

Комментарии • 4

  • @reginaldcrapo132
    @reginaldcrapo132 5 лет назад +2

    Great talk, David.

  • @rodamira
    @rodamira 4 года назад +2

    Instead of using Decimal (or floats) when dealing with money, you might want to consider using something like micro units, represented as ints (see Google's DFP API). That is, one "dollar" is not 1.00, but rather, it's represented as 1000000. Ten cents would be 1000000 / 10. You get the idea. No loss of precision is likely to occur, and performance is as good as it gets.

  • @LambdaJack
    @LambdaJack 5 лет назад +1

    It's over... 9000!!

  • @SVVV97
    @SVVV97 5 лет назад +3

    Interesting - they should've not allowed the Python 2 usage though :D