summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-complex/mrblib
AgeCommit message (Collapse)Author
2021-03-24complex.rb: unary plus (`+@`) to return self avoiding copying.Yukihiro "Matz" Matsumoto
2021-03-24complex.c: implement `Complex` addition and subtraction in C.Yukihiro "Matz" Matsumoto
2021-03-24complex.c: implement `Complex#/` and `#quo` in C.Yukihiro "Matz" Matsumoto
2021-03-24complex.c: implement `Complex#*` in C.Yukihiro "Matz" Matsumoto
2021-03-24rational.rb: avoid 'NaNi` representation.Yukihiro "Matz" Matsumoto
Use `NaN*i` as CRuby does.
2021-03-21complex.c: define `Complex#==` in C.Yukihiro "Matz" Matsumoto
This change also fixes the error caused by `rational.c` that calls `mrb_complex_eq()`, which had been undefined.
2021-03-19complex.c: overhaul complex operators.Yukihiro "Matz" Matsumoto
- define `MRB_TT_COMPLEX` - change object structure (`struct RComplex`) - add memory management for `MRB_TT_COMPLEX` - avoid operator overloading as much as possible - as a result, performance improved a log - should work with and without `Rational` defined
2021-02-05Refactor method overriding.Yukihiro "Matz" Matsumoto
* Use `class_eval` instead of `instance_eval`. * Reduce `class_eval` calls * define `Numeric#i` * undefine `Complex#i`
2021-02-05Add `Complex#to_c` method.Yukihiro "Matz" Matsumoto
2020-10-12Integrate `Fixnum` class into `Integer` classdearblue
* The `Fixnum` constant is now an alias for the `Integer` class. * Remove `struct mrb_state::fixnum_class` member. If necessary, use `struct mrb_state::integer_class` instead.
2020-06-20Symbolify saved alias name to improve performance.Yukihiro "Matz" Matsumoto
2019-12-15Drop dependencies from `mruby-complex` to some gemsKOBAYASHI Shuji
2019-08-09Avoid overflow and underflow in Complex#/Ray Chason
2019-08-08Implement Complex#abs in terms of Math.hypotRay Chason
Math.hypot avoids premature overflow and underflow
2019-07-18Avoid making top-level `env` in initialization code; ref #4581Yukihiro "Matz" Matsumoto
2019-05-26Remove some overhead from methods defined in Ruby in Complex.Yukihiro "Matz" Matsumoto
2019-05-21Implements part of `Complex` class in C.Yukihiro "Matz" Matsumoto
2019-05-18Move `Object#(Rational|Complex)` to `Kernel`KOBAYASHI Shuji
2019-05-15Basic implementation of Complex and Rational classesUkrainskiy Sergey
2019-05-15Initial suffix supportUkrainskiy Sergey