For example, 2299111234567890.76.to_words
In Sankhya, to_s function is used to overcome the floating point arithmetic approximations.
2.0.0-p247 :002 > 2299111234567890.76.to_s
=> "2.299111234567891e+15"
2.0.0-p247 :010 > 2299111234567890.76.to_words
=> ["two", "two hundred and ninety nine"]
Specifically, to_s handles up to 2189149675095052.8, before it switches over to scientific notation. Sankhya handles translation till this number correctly, beyond which scientific notation interferes.
For example, 2299111234567890.76.to_words
In Sankhya, to_s function is used to overcome the floating point arithmetic approximations.
Specifically, to_s handles up to 2189149675095052.8, before it switches over to scientific notation. Sankhya handles translation till this number correctly, beyond which scientific notation interferes.