𝕊𝕚𝕤𝕪𝕡𝕙𝕖𝕒𝕟 to Programmer [email protected] • 2 years agoFixedprogramming.devimagemessage-square26fedilinkarrow-up1331arrow-down16
arrow-up1325arrow-down1imageFixedprogramming.dev𝕊𝕚𝕤𝕪𝕡𝕙𝕖𝕒𝕟 to Programmer [email protected] • 2 years agomessage-square26fedilink
minus-square@[email protected]linkfedilink6•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-square@[email protected]linkfedilink3•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.