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

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 พ.ย. 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