-
Never use float for performing arithmetic calculations relating to money.
Floating numbers can sometimes show funky behaviour. It is not Ruby’s fault but the very implementation of floating numbers raises precision issues.
Examples of odd behaviour: