summaryrefslogtreecommitdiff
path: root/complex.c
AgeCommit message (Collapse)Author
2024-05-29merge revision(s) ↵Takashi Kokubun
dc146babf47a84bbd1f176d766637d4a40327019,f23d5028059078a346efc977287b669d494a5a3f,a0f7de814ae5c299d6ce99bed5fb308a05d50ba0: [Backport #20296] [Bug #20296] Clear errinfo when `exception: false` [Bug #20296] Refine the test [Bug #20296] Fix the default assertion message
2023-12-24RDoc for complex.cBurdetteLamar
2023-12-24RDoc for ComplexBurdetteLamar
2023-12-22[DOC] RDoc for Complex (#9307)Burdette Lamar
2023-12-19RDoc for ComplexBurdetteLamar
2023-12-19RDoc for ComplexBurdetteLamar
2023-12-18[DOC] RDoc for Complex (#9260)Burdette Lamar
2023-12-15[DOC] RDoc for Complex (#9254)Burdette Lamar
2023-12-15[DOC] RDoc for Complex (#9243)Burdette Lamar
2023-12-14[DOC] RDoc for Complex (#9231)Burdette Lamar
2023-12-12[DOC] RDoc for ComplexBurdetteLamar
2023-12-11[DOC] Complex doc (#9185)Burdette Lamar
2023-12-11Use dedicated functions to check terminatorsNobuyoshi Nakada
2023-12-10[DOC] RDoc for Complex (#9181)Burdette Lamar
2023-12-08RDoc for ComplexBurdetteLamar
2023-12-07RDoc for ComplexBurdetteLamar
2023-11-22Prevent a compiler warning: ‘zi’ may be used uninitializedYusuke Endoh
2023-11-21[Bug #11183] Fix rb_complex_pow for special anglesKouhei Yanagita
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)
2023-04-06[Feature #19474] Refactor NEWOBJ macrosMatt Valentine-House
NEWOBJ_OF is now our canonical newobj macro. It takes an optional ec Notes: Merged: https://github.com/ruby/ruby/pull/7393
2023-03-13[DOC] Enhanced RDoc for NilClass (#7500)Burdette Lamar
Notes: Merged-By: peterzhu2118 <peter@peterzhu.ca>
2022-12-02[Bug #19087] Disallow successive underscores in Complex stringNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6645
2022-11-16Using UNDEF_P macroS-H-GAMELINKS
Notes: Merged: https://github.com/ruby/ruby/pull/6721
2022-10-27Improve performance some `Integer` and `Float` methods [Feature #19085] (#6638)S.H
* Improve some Integer and Float methods * Using alias and Remove unnecessary code * Remove commentout code Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2022-10-23Reduce type check of arguments at Complex creationNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6618
2022-10-23[Bug #19004] `Complex.polar` handles complex singular `abs` argumentStephen Ierodiaconou
`Complex.polar` accepts Complex values as arguments for the polar form as long as the value of the complex has no imaginary part (ie it is 'real'). In `f_complex_polar` this is handled by extracting the real part of the arguments. However in the case `polar` is called with only a single argument, the absolute value (abs), then the Complex is created without applying a check on the type of abs, meaning it is possible to create a Complex where the real part is itself an instance of a Complex. This change removes the short circuit for the single argument case meaning the real part extraction is performed correctly (by f_complex_polar). Also adds an example to `spec/ruby/core/complex/polar_spec.rb` to check that the real part of a complex argument is correctly extracted and used in the resulting Complex real and imaginary parts. Notes: Merged: https://github.com/ruby/ruby/pull/6568 Merged-By: nobu <nobu@ruby-lang.org>
2022-10-17[DOC] Add the polar form in String#to_cNobuyoshi Nakada
2022-09-02Consider Complex from Complex casesNobuyoshi Nakada
The assertions that "an argument of a Complex constructor must not be a Complex" may not hold for some Numeric objects. Notes: Merged: https://github.com/ruby/ruby/pull/6317
2022-09-02[Bug #18937] Coerce non-real non-Numeric into Complex at comparisonsNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6317
2022-09-02Turn `f_zero_p` to `bool`Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6317
2022-08-22[Bug #18937] Coerce non-Numeric into Complex at comparisonsNobuyoshi Nakada
2022-08-12Remove Numeric#ceildivKouhei Yanagita
Notes: Merged: https://github.com/ruby/ruby/pull/5965
2022-08-12Add Numeric#ceildiv and Integer#ceildivKouhei Yanagita
Notes: Merged: https://github.com/ruby/ruby/pull/5965
2022-07-21Expand tabs [ci skip]Takashi Kokubun
[Misc #18891] Notes: Merged: https://github.com/ruby/ruby/pull/6094
2022-02-08[DOC] Fix broken links to literals.rdocNobuyoshi Nakada
2022-02-08[DOC] Simplify links to global methodsNobuyoshi Nakada
2021-12-03Adding links to literals and Kernel (#5192)Burdette Lamar
* Adding links to literals and Kernel Notes: Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
2021-10-18Remove declarations unused since a95262356ef5Nobuyoshi Nakada
2021-09-15Refactor and Using RBOOL macroS.H
Notes: Merged: https://github.com/ruby/ruby/pull/4837 Merged-By: nobu <nobu@ruby-lang.org>
2021-09-11Using RB_BIGNUM_TYPE_P macroS-H-GAMELINKS
Notes: Merged: https://github.com/ruby/ruby/pull/4805
2021-09-10include/ruby/internal/intern/complex.h: add doxygen卜部昌平
Must not be a bad idea to improve documents. [ci skip] Notes: Merged: https://github.com/ruby/ruby/pull/4815
2021-09-03Remove unneeded commentS-H-GAMELINKS
Notes: Merged: https://github.com/ruby/ruby/pull/4803
2021-09-02Extract always_finite_type_p and handle flonum casesNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/4801
2021-09-02Make internal predicate functions to return simple booleanNobuyoshi Nakada
2021-09-02Refactor f_infinite_p functionS-H-GAMELINKS
Notes: Merged: https://github.com/ruby/ruby/pull/4794
2021-08-27Use C99-defined signbit macroNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/4783
2021-08-18Replace f_boolcast with RBOOL macroS.H
* Move f_boolcast definination * Remove f_boolcast macro defination * to Notes: Merged: https://github.com/ruby/ruby/pull/4748 Merged-By: nobu <nobu@ruby-lang.org>
2021-05-20Rename nucomp_false s nucomp_real_p_mNobuyoshi Nakada
2021-05-12cdhash_cmp: can also take complex卜部昌平
There are complex literals `123i`, which can also be a case condition. Notes: Merged: https://github.com/ruby/ruby/pull/4469
2021-03-19Remove duplicated float_arg definationS-H-GAMELINKS
Notes: Merged: https://github.com/ruby/ruby/pull/4283
2021-01-07Follow the NDEBUG given to the wholeNobuyoshi Nakada