By Alvin Alexander. Last updated: May 2, 2019
As a brief note, here are a couple of examples about why you shouldn’t use double or float values for currency, courtesy of Joshua Bloch’s Effective Java book:
scala> 1.03 - .42 val res0: Double = 0.6100000000000001 scala> 1.00 - 9 * 0.10 val res1: Double = 0.09999999999999998