𝕊𝕚𝕤𝕪𝕡𝕙𝕖𝕒𝕟@programming.dev to Programmer Humor@programming.dev · 2 years agoFixedprogramming.devimagemessage-square26fedilinkarrow-up1261arrow-down15
arrow-up1256arrow-down1imageFixedprogramming.dev𝕊𝕚𝕤𝕪𝕡𝕙𝕖𝕒𝕟@programming.dev to Programmer Humor@programming.dev · 2 years agomessage-square26fedilink
minus-squarenous@programming.devlinkfedilinkarrow-up7·2 years agoDecimal 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·2 years agoDecimal 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.