orhtej2@eviltoast.org to Programmer Humor@programming.devEnglish · 20 hours agoFloating point arithmeticseviltoast.orgimagemessage-square44fedilinkarrow-up1697arrow-down14
arrow-up1693arrow-down1imageFloating point arithmeticseviltoast.orgorhtej2@eviltoast.org to Programmer Humor@programming.devEnglish · 20 hours agomessage-square44fedilink
minus-squareSmoothLiquidation@lemmy.worldlinkfedilinkEnglisharrow-up11·16 hours agoAs other people mentioned, things like the decimal structure works well, but you can also just use an int to store how many pennies something costs and convert it to dollars for display.
As other people mentioned, things like the decimal structure works well, but you can also just use an int to store how many pennies something costs and convert it to dollars for display.