𝕊𝕚𝕤𝕪𝕡𝕙𝕖𝕒𝕟@programming.dev to Programmer Humor@programming.dev · 1 年前Fixedprogramming.devimagemessage-square25fedilinkarrow-up1258arrow-down15
arrow-up1253arrow-down1imageFixedprogramming.dev𝕊𝕚𝕤𝕪𝕡𝕙𝕖𝕒𝕟@programming.dev to Programmer Humor@programming.dev · 1 年前message-square25fedilink
minus-squarenous@programming.devlinkfedilinkarrow-up7·1 年前Decimal does come at a cost though, being slower than raw floats. When you don’t need precision but do need performance then it is still valid to use floats. And quite often you don’t need absolute precision for things.
minus-squarenasal_demon@lemmy.fmhy.mllinkfedilinkarrow-up3·1 年前Decimal is less precise than binary. It’s just imprecise in ways that are less surprising to humans.
Decimal does come at a cost though, being slower than raw floats. When you don’t need precision but do need performance then it is still valid to use floats. And quite often you don’t need absolute precision for things.
Decimal is less precise than binary. It’s just imprecise in ways that are less surprising to humans.