irelephant [he/him]M to Software GoreEnglish · 4 months agopretty small subtotal.imagemessage-square26linkfedilinkarrow-up1154arrow-down13
arrow-up1151arrow-down1imagepretty small subtotal.irelephant [he/him]M to Software GoreEnglish · 4 months agomessage-square26linkfedilink
minus-squareFizzyOrangelinkfedilinkarrow-up1arrow-down1·4 months ago 0.1f64 + 0.2f64 != 0.3f64 It does if you round it to the nearest penny. Encoding in assumptions about a fixed amount of supported currencies in a system is broadly speaking not a good idea Most sensible programming languages allow enums to be non-exhaustive.
It does if you round it to the nearest penny.
Most sensible programming languages allow enums to be non-exhaustive.