𝕊𝕚𝕤𝕪𝕡𝕙𝕖𝕒𝕟@programming.dev to Programmer Humor@programming.dev · 1 year agoFixedprogramming.devimagemessage-square22fedilinkarrow-up1129arrow-down11
arrow-up1128arrow-down1imageFixedprogramming.dev𝕊𝕚𝕤𝕪𝕡𝕙𝕖𝕒𝕟@programming.dev to Programmer Humor@programming.dev · 1 year agomessage-square22fedilink
minus-squarenous@programming.devlinkfedilinkarrow-up7·1 year 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·1 year 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.