summaryrefslogtreecommitdiffstats
path: root/rational.c
Commit message (Collapse)AuthorAgeFilesLines
* * complex.c, rational.c: fixed indent.nobu2008-04-221-119/+132
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cmath.rb: new.tadf2008-04-051-4/+3
| | | | | | | | | | | | * 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-19/+2
| | | | | | | | | | | | * 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-3/+3
| | | | | | | | * 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
* * numeric.c (num_rdiv): should always return rational number.matz2008-04-021-33/+31
| | | | | | | | | | | * rational.c (nurat_add, nurat_sub, nurat_mul, nurat_fdiv, nurat_cmp): use rb_num_coerce_bin(). * rational.c (nurat_division): does / and rdiv. * .gdbinit (rp): no longer use rb_p(). git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * rational.c (nurat_int_check): function for DRY integer check.matz2008-04-021-54/+19
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * rational.c: need to include <float.h> just once.matz2008-04-011-4/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* adopted the ruby's style.tadf2008-03-311-989/+999
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* revert.tadf2008-03-311-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c (num_quo): should convert its operand to Rational.matz2008-03-311-1/+1
| | | | | | | | | * rational.c (string_to_r_strict): should raise TypeError. * bignum.c (Init_Bignum): should not redefine Bignum#div. Numeric#div will do. [ruby-dev:34066] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * complex.c (f_lcm): removed.tadf2008-03-271-22/+73
| | | | | | | | | | | | * 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-19/+19
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rearrangement.tadf2008-03-201-5/+8
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * rational.c (nurat_to_f): C99.nobu2008-03-201-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* improvements.tadf2008-03-201-68/+549
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* added rb_gcd.tadf2008-03-191-0/+6
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* revert.tadf2008-03-191-19/+16
| | | | 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-16/+19
| | | | | | | | | | | | 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/+1111
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e