Bug #7491

BigMath.#exp に Float、Rational を指定できない

Added by Sho Hashimoto over 1 year ago. Updated about 1 year ago.

[ruby-dev:46681]
Status:Assigned
Priority:Low
Assignee:Kenta Murata
Category:lib
Target version:next minor
ruby -v:ruby 2.0.0dev (2012-12-02 trunk 38135) [x86_64-linux] Backport:

Description

1.9.3 から BigMath.#exp でも Fixnum、Float、Rational オブジェクトが指定できるのではないかと思うのですが、Float、Rational については現在は ArgumentError と TypeError になってしまうようです。

puts BigMath.exp(BigDecimal("1.0"), 10) # => 0.2718281828E1
puts BigMath.exp(1, 10) # => 0.2718281828E1
puts BigMath.exp(1.0, 10) # => ArgumentError
puts BigMath.exp(Rational(1, 1), 10) # => TypeError

History

#1 Updated by Kenta Murata over 1 year ago

  • Status changed from Open to Assigned
  • Assignee set to Kenta Murata

#2 Updated by Kenta Murata about 1 year ago

  • Target version changed from 2.0.0 to next minor

Also available in: Atom PDF