Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
BigDecimal and Rational multiplication rounds the rational number #1695
BigDecimal.new('100') * Rational(1, 100)
currently returns 0. It should be returning 1.
It appears to be rounding the rational number before multiplying:
The same operation works correctly in cruby: