Trev13@programming.dev to Programming@programming.dev · 3 months agoBig Decimals: Stop Using Floats or Cents for Moneymedium.comexternal-linkmessage-square31linkfedilinkarrow-up153arrow-down12
arrow-up151arrow-down1external-linkBig Decimals: Stop Using Floats or Cents for Moneymedium.comTrev13@programming.dev to Programming@programming.dev · 3 months agomessage-square31linkfedilink
minus-squarebleistift2@sopuli.xyzlinkfedilinkEnglisharrow-up2·edit-23 months agoIf you count the programming language you use as ‘platform’, then yes. Python rounds both 11.5 and 12.5 to 12.
minus-squareWolfLink@sh.itjust.workslinkfedilinkarrow-up1·3 months agoThis is a common rounding strategy because it doesn’t consistently overestimate like the grade school rounding strategy of always rounding up does.
If you count the programming language you use as ‘platform’, then yes. Python rounds both 11.5 and 12.5 to 12.
This is a common rounding strategy because it doesn’t consistently overestimate like the grade school rounding strategy of always rounding up does.