summaryrefslogtreecommitdiff
path: root/complex.c
AgeCommit message (Collapse)Author
2009-07-03added examples.tadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-03 * complex.c (nucomp_equal_p): removed.tadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-03 * rational.c: renamed equal_p to eqeq_p.tadf
* complex.c: ditto. * complex.c (nucomp_equal_p): added. Complex(NaN).equal?(Complex(NaN)) should return true. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-03 * complex.c: undef-ed shome methods. [ruby-core:24110]tadf
* complex.c (Numeric#arg): NaN for NaN. [ruby-core:24116] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-29 * complex.c (nucomp_expt): do not use rb_fexpt.tadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-29 * complex.c (nucomp_expt): checks exactness.tadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-28 * complex.c (nucomp_div): raises ZeroDivisionError immediatelytadf
when the given second argument is zero. * rational.c (nurat_fdiv): never raise even if the given second argument is zero. * rational.c (rb_raise_zerodiv): changed the message (zero to 0). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-28 * complex.c (nucomp_expt): convert to a float when the given powertadf
is a bignum. * rational.c (nurat_expt): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-28 * complex.c (nucomp_expt): some improvements.tadf
* rational.c (nurat_expt): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-28 * complex.c: renamed some static functions.tadf
* rational.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-27trivial change.tadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-27 * complex.c (nucomp_addsub): newtadf
* complex.c (nucomp_{add,sub}): use nucomp_addsub. * complex.c (nucomp_divide): changed the algorithm. * complex.c (nucomp_abs): added shortcuts. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-27 * complex.c: revised rdoc.tadf
* rational.c: ditto. * numeric.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-20 * complex.c: edited rdoc.tadf
* numeric.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-19 * complex.c: edited rdoc.tadf
* rational.c: ditto. * numeric.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-19 * complex.c: edited rdoc.tadf
* rational.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-19 * complex.c; edited rdoc.tadf
* rational.c; ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-19 * complex.c: added rdoc.tadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-19 * complex.c: constant COMPLEX_NAME has been removed.tadf
* rational.c: constant RATIONAL_NAME has been removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-18 * rational.c (nurat_s_convert): calls to_r when the given argumenttadf
is non-integer. * rational.c (nurat_s_convert): raises TypeError when the given argument is nil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-16 * complex.c (nucomp_coerce): accepts Complex instances.tadf
* rational.c (nurat_coerce): accepts Rational instances. [ruby-core:23859] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-13 * complex.c (nucomp_fdiv): use fdiv recursively.tadf
* complex.c (nucomp_expt): reduced code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-15* complex.c (f_signbit): fixed indentation.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-14* string.c (rb_hash_uint32, rb_hash_uint, rb_hash_start, rb_hash_end),mame
include/ruby/intern.h: add Murmurhash API. [ruby-dev:37784] * complex.c (nucomp_hash), array.c (rb_ary_hash), time.c (time_hash), string.c (rb_str_hsah), object.c (rb_obj_hash), range.c (range_hash), struct.c (rb_struct_hash), hash.c (rb_any_hash), rational.c (nurat_hash): use Murmurhash. [ruby-dev:37784] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02* complex.c (f_signbit): regard NaN as a positive value.shugo
[ruby-dev:37861]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-29 * bignum.c (rb_cstr_to_inum): changed an error message.tadf
* complex.c (string_to_c_strict): ditto. * rational.c (string_to_r_strict): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-13 * complex.c: use rb_usascii_str_new2 instead of rb_str_new2.tadf
* rational.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-12 * complex.c (nucomp_canonicalization): renamed.tadf
* ext/math/complex.c: followed the above change. * rational.c (nurat_canonicalization): renamed. * ext/math/rational.c: followed the above change. * configure.in: defines a new macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-12 * complex.c, rational.c: do not use RUBY_VERSION_CODE.tadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-12* complex.c, rational.c: do not use RUBY_VERSION_CODE.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-10 * complex.c: avoided warnings on cpp.tadf
* rational.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-05 * complex.c: inpsect should not depend on to_s.tadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-03 * complex.c (nurat_{to_s,inspect}): provides better representationtadf
for in-finite imag part. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-03 * complex.c (f_signbit): NaN may be signed value.tadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-29* complex.c (imp1, imp2): should declare type.takano32
[BUG] at IA-64 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-28 * complex.c: uses macro in declarations.tadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-28 * math.c (rb_math_{atan2,cos,cosh,hypot,log,sin,sinh,sqrt}): added.tadf
* complex.c: follows the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-28 * complex.c: continues to support canonicalization *unofficially*tadf
for an odd library mathn for the time being (only 1.9.x). since grand mathn is must be very very special library for us. * rational.c: ditto. * ext/mathn/*/*: follow the above changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-13* complex.c (m_sqrt): unused.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-24* complex.c (Init_Complex), rational.c (Init_Rational): undefinesnobu
default #allocate methods which call the allocater. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-24* complex.c (Init_Complex), rational.c (Init_Rational): ID_ALLOCATORnobu
differs from :allocate, and invisible in ruby level. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-23 * complex.c (nucomp_s_canonicalize_internal): does no applytadf
canonicalization rule anymore. * rational.c (nurat_s_canonicalize_internal(_no_reduce)?): ditto. * complex.c: removed class method new! and new. * rational.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-21fixed previous commit.tadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-21 * complex.c: added two macros.tadf
* rational.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-21 * complex.c (nucomp_s_convert): checks argc.tadf
* rational.c (nurat_s_convert): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-21trivial changes.tadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-21 * complex.c (nucomp_s_canonicalize_internal): checks exactness oftadf
imag only. * rational.c (nurat_s_convert): accepts non real value (Rational(a,b) as a/b). * complex.c (nucomp_s_convert): refined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-20 * complex.c: an instance method image has been removed andtadf
uses "imag" instead of "image". * complex.c: two instance method re and im are removed. * rational.c: follows the above changes. * include/ruby/ruby.h: ditto. * gc.c: ditto. * lib/cmath.rb: ditto. * lib/mathn.rb: ditto. * lib/complex.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-19 * complex.c: uses f_(in)?exact_p macro.tadf
* rational.c: ditto. * bignum.c (rb_big_pow): bignum**bignum - should calculate without rational. * lib/complex.rb: should override Math module at most once. * lib/mathn.rb: requires 'cmath' directly. -この行以下は無視されます -- M complex.c M ChangeLog M lib/mathn.rb M lib/complex.rb M bignum.c M rational.c git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-17 * complex.c (nucomp_s_convert): accepts complextadf
value (Complex(a,b) as a+bi). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e