summaryrefslogtreecommitdiffstats
path: root/complex.c
Commit message (Collapse)AuthorAgeFilesLines
* * complex.c (string_to_c, nucomp_s_convert): preserve the currenttadf2008-06-131-8/+17
| | | | | | | | | | | | backref. * rational.c (string_to_r, nurat_s_convert): ditto. * include/ruby/intern.h (rb_match_busy): added a declaration. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * complex.c (string_to_c_internal): save and restore backref. fixed ↵wanabe2008-06-131-2/+7
| | | | | | [ruby-dev:34991] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * complex.c: refactoring.tadf2008-06-121-90/+41
| | | | | | | | * rational.c: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * complex.c (nucomp_s_convert): need not to initialize optionaltadf2008-06-101-2/+0
| | | | | | | | argument for rb_scan_args(). git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fixedtadf2008-06-091-12/+17
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * complex.c (nucomp_s_convert): can accept Complex('i').tadf2008-06-091-10/+18
| | | | | | | | [ruby-dev:34991] and some minor changes. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (CONST_ID): constant ID cache for non-gcc.nobu2008-06-091-0/+2
| | | | | | | * *.c: no cache in init functions. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * complex.c (make_patterns): constified.nobu2008-06-091-4/+6
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * math.c (to_flo): rb_Float() accepts even strings for input.matz2008-05-161-2/+2
| | | | | | | | | | | * complex.c (nucomp_to_f): fix wrong message. * complex.c (nucomp_to_r): ditto. * object.c (rb_Float): do not check NaN for error. NaN is a part of valid float values. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * complex.c, rational.c: fixed indent.nobu2008-04-221-117/+130
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * complex.c (nucomp_div): [ruby-dev:34357]tadf2008-04-141-5/+20
| | | | | | | | | | | | * complex.c (nucomp_abs): use hypot. * complex.c (nucomp_quo): do not force convertion. * test/ruby/test_complex.rb: omitted some meaningless tests. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cmath.rb: new.tadf2008-04-051-121/+18
| | | | | | | | | | | | * lib/complex.rb: depends lib/cmath.rb. * lib/rational.rb: added rdiv. * complex.c: removed some math functions. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (Init_Bignum): rdiv method removed. [ruby-dev:34242]matz2008-04-031-6/+3
| | | | | | | | | | | | * complex.c (nucomp_quo): ditto. * numeric.c (num_rdiv): ditto. * rational.c (nurat_div): ditto. * complex.c (nucomp_fdiv): fdiv implementation restored. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * complex.c (nucomp_int_check): function for DRY real check.tadf2008-04-031-61/+24
| | | | | | | | * complex.c (nucomp_{add,sub,mul,div,expt}): use rb_num_coerce_bin(). git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* adopted the ruby's style.tadf2008-03-311-884/+892
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* revert git backfire in r15860; sorrymatz2008-03-301-27/+18
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c (proc_dup): should copy is_lambda attribute as well.matz2008-03-301-18/+27
| | | | | | [ruby-talk:296244] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * complex.c (f_lcm): removed.tadf2008-03-271-27/+18
| | | | | | | | | | | | * rational.c (rb_lcm, rb_gcdlcm): added. * lib/complex.rb (gcd, lcm, gcdlcm): removed. * lib/rational.rb (gcd, lcm, gcdlcm): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* trivial changes.tadf2008-03-241-55/+55
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fixed. [ruby-dev:34109]tadf2008-03-221-14/+14
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * complex.c (nucomp_sub, nucomp_expt): call corresponding functions.mame2008-03-201-2/+2
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* improvements.tadf2008-03-201-52/+255
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* added rb_gcd.tadf2008-03-191-75/+2
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* revert.tadf2008-03-191-24/+23
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * complex.c (nucomp_to_s, nucomp_inspect): get rid of makingnobu2008-03-191-23/+24
| | | | | | | | | | | | unnecessary intermediate objects. * complex.c (make_patterns, string_to_c): do not treat successive underscores as a part of numeric like as literals. [ruby-dev:34085] * rational.c (make_patterns, string_to_r): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* edited comments.tadf2008-03-161-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* both complex and rational are now builtin classes.tadf2008-03-161-0/+1533
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e