[ruby-cvs:70183] mame:r63093 (trunk): bignum.c: Bignum#fdiv avoids double division when divisor is bignum

mame at ruby-lang.org mame at ruby-lang.org
Wed Apr 4 23:02:59 JST 2018


mame	2018-04-04 23:02:59 +0900 (Wed, 04 Apr 2018)

  New Revision: 63093

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63093

  Log:
    bignum.c: Bignum#fdiv avoids double division when divisor is bignum
    
    `Rational(int, bignum).to_f` sometimes returned a wrong result because
    `Bignum#div` casted its divisor to double.  [Bug #14637] [ruby-core:86330]

  Modified files:
    trunk/bignum.c
    trunk/test/ruby/test_rational.rb


More information about the ruby-cvs mailing list