Issue #14026 has been updated by frankpimenta (Frank Pimenta).


  ~$ ruby -v
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16]
  ~$ rvm use 2.4.2
Using /Users/frankpimenta/.rvm/gems/ruby-2.4.2
  ~$ ruby -rbigdecimal -e 'p 196.fdiv(BigDecimal("13.0"))'
2.203413367e-314
  ~$ rvm use 2.4.1
Using /Users/frankpimenta/.rvm/gems/ruby-2.4.1
  ~$ ruby -rbigdecimal -e 'p 196.fdiv(BigDecimal("13.0"))'
2.1358685693e-314
  ~$ rvm use 2.3.5
Using /Users/frankpimenta/.rvm/gems/ruby-2.3.5
  ~$ ruby -rbigdecimal -e 'p 196.fdiv(BigDecimal("13.0"))'
"#<BigDecimal:7fefe380a428,'0.1507692307 6923076923E2',27(36)>
  ~$ ruby -rbigdecimal -e 'p 196.fdiv(BigDecimal("13.0")).to_s("F")'"
"15.076923076923076923"
  ~$ rvm use 2.4.2
Using /Users/frankpimenta/.rvm/gems/ruby-2.4.2
  ~$ ruby -rbigdecimal -e 'p 4.fdiv(BigDecimal("2.0"))'
2.236682878e-314
  ~$ ruby -rbigdecimal -e 'p 4.fdiv(BigDecimal("2"))'
2.2136573e-314
  ~$ man ruby
  ~$ ruby -e 'p Float::MIN'
2.2250738585072014e-308
  ~$ ruby -rbigdecimal -e 'p 4.fdiv(BigDecimal("2")).class'
Float
  ~$ ruby -e 'p Float::MAX'
1.7976931348623157e+308

----------------------------------------
Bug #14026: RUBY ERROR ON DIVISION with FDIV 
https://bugs.ruby-lang.org/issues/14026#change-67299

* Author: frankpimenta (Frank Pimenta)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: >2.4
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
  ~$ ruby -v
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16]
  ~$ rvm use 2.4.2
Using /Users/frankpimenta/.rvm/gems/ruby-2.4.2
  ~$ ruby -rbigdecimal -e 'p 196.fdiv(BigDecimal("13.0"))'
2.203413367e-314
  ~$ rvm use 2.4.1
Using /Users/frankpimenta/.rvm/gems/ruby-2.4.1
  ~$ ruby -rbigdecimal -e 'p 196.fdiv(BigDecimal("13.0"))'
2.1358685693e-314
  ~$ rvm use 2.3.5
Using /Users/frankpimenta/.rvm/gems/ruby-2.3.5
  ~$ ruby -rbigdecimal -e 'p 196.fdiv(BigDecimal("13.0"))'
#<BigDecimal:7fefe380a428,'0.1507692307 6923076923E2',27(36)>
  ~$ ruby -rbigdecimal -e 'p 196.fdiv(BigDecimal("13.0")).to_s("F")'
"15.076923076923076923"
  ~$ rvm use 2.4.2
Using /Users/frankpimenta/.rvm/gems/ruby-2.4.2
  ~$ ruby -rbigdecimal -e 'p 4.fdiv(BigDecimal("2.0"))'
2.236682878e-314
  ~$ ruby -rbigdecimal -e 'p 4.fdiv(BigDecimal("2"))'
2.2136573e-314
  ~$ man ruby
  ~$ ruby -e 'p Float::MIN'
2.2250738585072014e-308
  ~$ ruby -rbigdecimal -e 'p 4.fdiv(BigDecimal("2")).class'
Float
  ~$ ruby -e 'p Float::MAX'
1.7976931348623157e+308
  ~$

---Files--------------------------------
Screen Shot 2017-10-18 at 16.50.46.png (205 KB)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>