you are viewing a single comment's thread
view the rest of the comments
[–] 0 points 1 year 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.

  • source
  • parent