From: "kyanagi (Kouhei Yanagita) via ruby-dev" Date: 2023-11-16T12:20:39+00:00 Subject: [ruby-dev:52063] [Ruby master Bug#11183] Cumulative error on Complex::I ** 100000000000000000000000000000000 Issue #11183 has been updated by kyanagi (Kouhei Yanagita). https://github.com/ruby/ruby/pull/8931 self ������������45������������������������������������������������������������������������������������������ ``` 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) ``` * self ��� 1, -1, 1i, -1i ��������� * bignum ��������������������������������������������������� * self ������������������������������������������1��������������� * ��������� 45 ������������������������������ * ���������������������������������0���Infinity��������������������������������������������������������������������������������� ������������ 1 ������������ 45 ���������������������������������������������������������1/\sqrt{2}������Float������������������������������������������������������ ���������45������������������������������������������������������ n ���������������������1��������������������������������������������� ���������60 ������������������������������������������������������ 45 ������������������������������������������������������������Complex ��������������������������������������������������������������������������������������������������������� ������������Complex ������������������������������ 45 ������������������������������������������������������������������ ��������� n ������������������ n ������������������������������������������������������������������ 45 ��������������������������������������������������������������� ---------------------------------------- Bug #11183: Cumulative error on Complex::I ** 100000000000000000000000000000000 https://bugs.ruby-lang.org/issues/11183#change-105340 * Author: ko1 (Koichi Sasada) * Status: Open * Priority: Normal * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- ``` p Complex::I ** 100000000000000000000000000000000 ``` ������32bit ��������������� ``` ruby 2.3.0dev (2015-05-21 trunk 50502) [i386-mswin32_110] t.rb:1: warning: in a**b, b may be too big (-0.08483712490438944+1.5651333429325577e+32i) ``` ��������������������������������������������� ``` # ubuntu 64bit ������ (0.9943722416631883-0.10594264962575697i) ``` ��������������������������� 1+0i ������������������������������������������������������ ������������������������������������������������������: > ������������������������������������Complex#** ���������(������)���Fixnum������������������������������������������������������������������������������r��������������������������������������������������f_complex_polar������������Complex��������������������������������������������������Float���������������������������������������������������������������������������������������������������������������������f_complex_polar��������������������������0�����90�����180�����270��������������������������������������������������������double������==������������������������������������������������������������������������������������������������������ > �����n������������������������������n���������������������������360�����0�������������������������������������������������������������������������������������������������������������������������������������������������������������������������� ---Files-------------------------------- my_complex.diff (2.09 KB) -- https://bugs.ruby-lang.org/