𝕊𝕚𝕤𝕪𝕡𝕙𝕖𝕒𝕟@programming.dev to Programmer Humor@programming.devEnglish · 1 year agoFixedprogramming.devimagemessage-square26fedilinkarrow-up1262arrow-down15
arrow-up1257arrow-down1imageFixedprogramming.dev𝕊𝕚𝕤𝕪𝕡𝕙𝕖𝕒𝕟@programming.dev to Programmer Humor@programming.devEnglish · 1 year agomessage-square26fedilink
minus-squarenous@programming.devlinkfedilinkEnglisharrow-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.mllinkfedilinkEnglisharrow-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.