Like in any language, a FLOAT will eventually corrupt data due to rounding errors.
FLOAT
Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)
Please use DECIMAL, which has well-defined behavior for rounding and range overflows.
DECIMAL