Forum: Ruby-dev [ruby-trunk - Bug #7491][Open] BigMath.#exp に Float、Rational を指定できない

Posted by sho-h (Sho Hashimoto) (Guest)
on 2012-12-02 02:52
(Received via mailing list)
Issue #7491 has been reported by sho-h (Sho Hashimoto).

----------------------------------------
Bug #7491: BigMath.#exp に Float、Rational を指定できない
https://bugs.ruby-lang.org/issues/7491

Author: sho-h (Sho Hashimoto)
Status: Open
Priority: Low
Assignee:
Category: lib
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2012-12-02 trunk 38135) [x86_64-linux]


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
Posted by mrkn (Kenta Murata) (Guest)
on 2012-12-02 18:43
(Received via mailing list)
Issue #7491 has been updated by mrkn (Kenta Murata).

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


----------------------------------------
Bug #7491: BigMath.#exp に Float、Rational を指定できない
https://bugs.ruby-lang.org/issues/7491#change-34324

Author: sho-h (Sho Hashimoto)
Status: Assigned
Priority: Low
Assignee: mrkn (Kenta Murata)
Category: lib
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2012-12-02 trunk 38135) [x86_64-linux]


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
Posted by mrkn (Kenta Murata) (Guest)
on 2013-02-17 07:32
(Received via mailing list)
Issue #7491 has been updated by mrkn (Kenta Murata).

Target version changed from 2.0.0 to next minor


----------------------------------------
Bug #7491: BigMath.#exp に Float、Rational を指定できない
https://bugs.ruby-lang.org/issues/7491#change-36406

Author: sho-h (Sho Hashimoto)
Status: Assigned
Priority: Low
Assignee: mrkn (Kenta Murata)
Category: lib
Target version: next minor
ruby -v: ruby 2.0.0dev (2012-12-02 trunk 38135) [x86_64-linux]


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
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.