I found two more cases where `rb_big_fdiv_double` produces an incorrectly rounded result. I added them to [pull request #18599](https://github.com/ruby/ruby/pull/18559). ```Ruby assert_equal(3.333333333333333e39, (10**40).fdiv(3), "Bug...rgburger (Robert Burger)
Here's an example of Rational#to_f giving an incorrect result when the numerator is a bignum and the denominator is a fixnum that can't be exactly represented as a double: `Rational(10**24, 10**17 + 9).to_f` should return 10000000.0, but...rgburger (Robert Burger)
Consider the related code in `fix_fdiv_double`, which demonstrates a check for the denominator y being a fixnum that's exactly represented by a double. ``` static double fix_fdiv_double(VALUE x, VALUE y) { if (FIXNUM_P(y)) { ...rgburger (Robert Burger)
This bug is not related to Feature #21308 except for the same author. The implementation of Rational#to_f does not perform any base conversions. The bug is caused by the assumption that a floating-point conversion of a bignum numerator ...rgburger (Robert Burger)