aboutsummaryrefslogtreecommitdiffstats
path: root/lib/complex.rb
Commit message (Collapse)AuthorAgeFilesLines
* warn only when $VERBOSE.tadf2009-08-161-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/complex.rb, lib/rational.rb: added warning messages.tadf2009-08-161-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * complex.c: edited rdoc.tadf2009-06-191-0/+2
| | | | | | | | * rational.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/complex.rb: provides some obsolate methods.tadf2008-09-201-0/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * complex.c: an instance method image has been removed andtadf2008-09-201-0/+6
| | | | | | | | | | | | | | | | | | | | | | 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
* * complex.c: uses f_(in)?exact_p macro.tadf2008-09-191-2/+4
| | | | | | | | | | | | | | | | | | | | | | | * 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
* * complex.c (nucomp_div): now behaves as quo.tadf2008-08-221-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * complex.c (nucomp_s_generic_p): has been removed. * complex.c (nucomp_to_s): adopts new form. * complex.c (nucomp_inspect): ditto. * complex.c (string_to_c_internal): ditto and supports polar form. * complex.c (rb_complex_polar): new. * rational.c (nurat_to_s): did not canonicalize. * rational.c (nurat_inspect): adopts new form. * rational.c (string_to_r_internal): ditto. * include/ruby/intern.h: added a declaration. * lib/complex.rb: added an obsolate class method. * lib/cmath.rb: use scalar? instead of generic?. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/complex.rb: remove Math first before overwriting by CMath.matz2008-04-081-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/complex.rb depends lib/cmath.rb.tadf2008-04-051-224/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cmath.rb: new.tadf2008-04-051-0/+6
| | | | | | | | | | | | * lib/complex.rb: depends lib/cmath.rb. * lib/rational.rb: added rdiv. * complex.c: removed some math functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* revert git backfire in r15860; sorrymatz2008-03-301-32/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c (proc_dup): should copy is_lambda attribute as well.matz2008-03-301-0/+32
| | | | | | [ruby-talk:296244] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * complex.c (f_lcm): removed.tadf2008-03-271-32/+0
| | | | | | | | | | | | * rational.c (rb_lcm, rb_gcdlcm): added. * lib/complex.rb (gcd, lcm, gcdlcm): removed. * lib/rational.rb (gcd, lcm, gcdlcm): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* both complex and rational are now builtin classes.tadf2008-03-161-517/+103
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rational.rb (floor, ceil, truncate, round): do not usetadf2008-02-121-3/+38
| | | | | | | | | | | | | | | | | | | | definitions of Numeric. * lib/rational.rb (to_i): should returns truncated self. * lib/complex.rb (numerator): requires Integer#{numerator,denominator}. * lib/complex.rb (quo): do not use definition of Numeric. * lib/complex.rb (>, >=, <, <=, between?, div, divmod, modulo, floor, ceil, truncate, round): undef'ed. * lib/mathn.rb (Rational#inspect): removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * $Date$ keyword removed to avoid inclusion of locale dependentakr2008-01-061-1/+0
| | | | | | | string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/complex.rb: be able to create Complex(0, -0.0). [ruby-list:44268]keiju2007-11-261-0/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * object.c (rb_mod_attr): make Module#attr to be an alias tomatz2006-07-201-2/+2
| | | | | | | | | | attr_reader. [RCR#331] * ruby.h: export classes/modules to implement sandbox. [ruby-core:08283] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * sprintf.c (rb_f_sprintf): [ruby-dev:27967]matz2005-12-071-0/+4
| | | | | | | | | | | | * range.c (range_include): use discrete membership for non Numeric values, for example, String. * numeric.c (num_scalar_p): new method. [ruby-dev:27936] * lib/complex.rb (Complex#scalar?): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * misc/ruby-mode.el (ruby-expr-beg): support $! at the end ofmatz2005-11-301-7/+2
| | | | | | | expression. [ruby-dev:27868] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c (rb_num_coerce_relop): export function.matz2003-07-311-69/+63
| | | | | | | | * marshal.c (w_object): check has been dropped. "_dump must return string." [ruby-dev:21024] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/smtp.rb (Net::SMTP::send0): add taint check.matz2003-07-291-5/+5
| | | | | | | | | * ruby.h (LLONG_MIN): wrong value. * io.c (rb_f_getc): $stdin may not be IO. [ruby-dev:20973] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/tk/lib/tk.rb (TkCore::chooseDirectory): back up wronglymatz2003-07-261-82/+112
| | | | | | | removed method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* remove debug messagematz2003-07-251-1/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * variable.c (rb_mod_const_missing): new method. [ruby-core:00441]matz2003-07-221-6/+10
| | | | | | | | | | | | | | | | * variable.c (rb_const_get_at): allow "const_missing" hook. * variable.c (rb_const_get_0): ditto. * eval.c (method_missing): rename from rb_undefined to clarify. * eval.c (ruby_finalize_0): update exit status if any of END proc raises SystemExit. [ruby-core:01256] * eval.c (rb_exec_end_proc): reduce rb_protect(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_clear_cache_by_class): check both klass and origin.matz2003-07-171-9/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Re-expose Complex.new as .new! (Kernel#Complex needs to call _something_ :)dave2003-04-241-4/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cgi.rb (CGI::QueryExtension::[]): always return Valuematz2003-04-231-2/+2
| | | | | | | object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_fread): may lose data on nonblocking read.matz2003-03-231-7/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/complex.rb (Complex#==): should not raise error by typematz2003-02-061-2/+1
| | | | | | | | | mismatch. * lib/rational.rb (Rational#==): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Added RDoc comments. See comments at EOF for remaining issues.gsinclair2003-02-041-37/+148
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * range.c (range_step): iteration done using "+" if elements arematz2002-05-301-1/+2
| | | | | | | | | | | | | | | | | | Numeric. Otherwise using "succ". * range.c (range_each): iteration done using "succ". If the elements does not respond to "succ", raise TypeError. As a result, all Enumerable methods, e.g. collect, require elements to respond to "succ'. * range.c (range_member): comparison done using "each", if elements are non-Numeric or no-"succ" objects. Otherwise compare using "<=>". * range.c (Init_Range): remove "size" and "length". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * various files: macro fix-up by Michal Rokos.matz2002-04-251-1/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * class.c (rb_mod_clone): should not copy class name, since clonematz2001-10-221-13/+0
| | | | | | | | | | | | | should remain anonymous. * eval.c (rb_call0): self in a block given to define_method now be switched to the receiver of the method. * eval.c (proc_invoke): added new parameter to allow self switching. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_index): wrong increment for non alphanumericmatz2001-10-161-1/+1
| | | | | | | string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* matzmatz2000-08-071-6/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* matzmatz2000-07-181-2/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 2000-01-17matz2000-01-171-13/+19
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 1.4.0matz1999-08-131-8/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* This commit was generated by cvs2svn to compensate for changes in r372,matz1999-01-201-4/+10
| | | | | | | which included commits to RCS files with non-trunk default branches. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Initial revisionv1_0_r2matz1998-01-161-0/+490
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2 b2dd03c8-39d4-4d8f-98ff-823fe69b080e