diff options
| author | Kouhei Yanagita <yanagi@shakenbu.org> | 2023-11-16 20:32:53 +0900 |
|---|---|---|
| committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-11-21 14:06:26 +0900 |
| commit | 04eb40b633397d03e4cbce41418626f4fabdcb02 (patch) | |
| tree | 2b389837be37ecb942aaeb856375dc862d9c8231 /spec/ruby/core | |
| parent | b6b31f673d9514a8af8992b0f7abb8b0597d87af (diff) | |
[Bug #11183] Fix rb_complex_pow for special angles
Add a special treatment for when the argument of self is an
integral multiple of 45 degrees.
1i ** (10 ** 100) #=> 1+0i
1i ** (10 ** 100 + 1) #=> 0+1i
(1+1i) ** (10 ** 100) # warning: in a**b, b may be too big
#=> (Infinity+0.0i)
(1+1i) ** (10 ** 100 + 1) # warning: in a**b, b may be too big
#=> (Infinity+Infinity*i)
Diffstat (limited to 'spec/ruby/core')
0 files changed, 0 insertions, 0 deletions
