Project

General

Profile

Actions

Bug #7491

closed

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

Added by sho-h (Sho Hashimoto) over 11 years ago. Updated over 4 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 2.0.0dev (2012-12-02 trunk 38135) [x86_64-linux]
[ruby-dev:46681]

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

Updated by mrkn (Kenta Murata) over 11 years ago

  • Status changed from Open to Assigned
  • Assignee set to mrkn (Kenta Murata)

Updated by mrkn (Kenta Murata) about 11 years ago

  • Target version changed from 2.0.0 to 2.6
Actions #3

Updated by naruse (Yui NARUSE) over 6 years ago

  • Target version deleted (2.6)
Actions #4

Updated by jeremyevans0 (Jeremy Evans) over 4 years ago

  • Status changed from Assigned to Closed
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0