Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Strange dump behavior for floats #78
This comment has been minimized.
This comment has been minimized.Show comment Hide comment
You will probably find that Ruby does something similar when printing. Floats are inherently imprecise. Others have noticed this and use BigDecimals instead when precision is important. There is an option in Oj to force the use of BigDecimal when loading. It is :big decimal_load.
Does that answer the question?