aboutsummaryrefslogtreecommitdiffstats
path: root/lib/cmath.rb
Commit message (Collapse)AuthorAgeFilesLines
* lib/cmath.rb: Specify frozen_string_literal: true.kazu2017-01-041-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add frozen_string_literal: false for all filesnaruse2015-12-161-0/+1
| | | | | | When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cmath.rb: methods which has suffix '!' are now deprecated.ngoto2015-11-221-57/+64
| | | | | | | | Re-apply r52469 made by Kazuki Tanaka, with fixing bug about mathn.rb compatibility. [ruby-core:68528] [Feature #10974] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert r52469naruse2015-11-061-60/+57
| | | | | | | | "* lib/cmath.rb: methods which has suffix '!' are now deprecated." It breaks rubyspec: http://rubyci.s3.amazonaws.com/ubuntu1510/ruby-trunk/log/20151106T153002Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cmath.rb: methods which has suffix '!' are now deprecated.gogotanaka2015-11-061-57/+60
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cmath.rb: shouldn't use non-ASCII characters in documentation. as ausa2015-07-031-1/+1
| | | | | | | | custom, single quote is seen as the same as apostrophe in computer typography. [skip ci] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cmath.rb: [DOC] Documentation improvements [ci skip]gogotanaka2015-06-061-23/+16
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cmath.rb: [DOC] Add docs [ci skip][Fix GH-909][Bug #11162]gogotanaka2015-06-061-13/+56
| | | | | | Patch provided by @davydovanton git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cmath.rb (log): raise ArgumentError when more than 2 argumentsgogotanaka2015-02-241-13/+4
| | | | | | are passed. [ruby-core:66143] [Bug #10487] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cmath.rb: fixed indent.hsbt2014-08-091-56/+56
| | | | | | | * lib/drb/ssl.rb: ditto. * lib/irb/**/*.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cmath.rb: Remove duplicate RDoc heading from overviewzzak2013-05-201-2/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cmath.rb: should return a real number if possible.tadf2011-07-231-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cmath.rb: Hide handle_no_method_error from RDoc.drbrain2011-06-301-1/+1
| | | | | | | * error.c: Document or hide undocumented error classes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cmath.rb (CMath.log): second argument: b can be nil.naruse2011-06-291-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cmath.rb: make same exception for Math. fix [Bug #3137].keiju2011-06-291-96/+176
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cmath.rb: add new methd Object#real?. fix #3137keiju2011-06-131-0/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cmath.rb (CMath.cbrt): returns the principal value of the cubemrkn2011-06-131-6/+2
| | | | | | | | root of the argument. fix #3676 * test/test_cmath.rb (test_cbrt_returns_principal_value_of_cube_root): test for the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib: Convert tabs to spaces for ruby files perdrbrain2011-05-181-13/+13
| | | | | | | | | http://redmine.ruby-lang.org/projects/ruby/wiki/DeveloperHowto#coding-style Patch by Steve Klabnik [Ruby 1.9 - Bug #4730] Patch by Jason Dew [Ruby 1.9 - Feature #4718] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cmath.rb: Add some examples and improve documentation. Patch bydrbrain2011-05-171-12/+35
| | | | | | | Sandor Szücs. [Ruby 1.9 - Bug #4727] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cmath.rb: Improve documentation. Patch by Jason Dew.drbrain2011-05-171-0/+43
| | | | | | | [Ruby 1.9 - Feature #4717] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cmath.rb (CMath.sqrt): use floating-point value. [ruby-core:31672] ↵mrkn2010-08-111-1/+1
| | | | | | | | [Bug #3678] * test/test_cmath.rb: added for testing lib/cmath.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cmath.rb (CMath#cbrt): cbrt should accept a negative realmame2010-07-211-1/+1
| | | | | | numbers. [ruby-core:31234] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * complex.c, rational.c, lib/cmath.rb, lib/date.rb lib/date/delta*:tadf2010-04-261-2/+22
| | | | | | | | reverted r27484-27486. now official spec. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cmath.rb: reverted experimental r23900.tadf2010-04-251-22/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use num#i.tadf2009-08-161-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cmath.rb (log2, cbrt): added. [experimental]tadf2009-06-291-2/+22
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* reverted.tadf2009-06-291-23/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * complex.c (nucomp_expt): do not use rb_fexpt.tadf2009-06-291-2/+23
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cmath.rb (sqrt): fixed an issue [ruby-list:45852]tadf2009-06-281-1/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cmath.rb (exp): omitted redundant function call.tadf2009-06-111-11/+12
| | | | | | | and some adjustments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cmath.rb (log10): raised exception when the given number istadf2009-06-091-1/+1
| | | | | | | | a negative real. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cmath.rb (log): avoided redundant expression.tadf2009-06-071-2/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* do not pass -infinity.tadf2008-12-111-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cmath.rb (sqrt): should pass nan or infinity to the originaltadf2008-12-111-1/+1
| | | | | | | | method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cmath.rb (log2,cbrt,frexp,ldexp,hypot,erf,erfc,gamma,lgamma):tadf2008-10-181-0/+10
| | | | | | | | should be also privided as module function. [ruby-dev:36787] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * complex.c: an instance method image has been removed andtadf2008-09-201-16/+16
| | | | | | | | | | | | | | | | | | | | | | 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
* * numeric.c: provides predicate real? instead of scalar?.tadf2008-09-161-17/+17
| | | | | | | | | | * complex.c: follows the above change. * lib/cmath.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * complex.c (nucomp_div): now behaves as quo.tadf2008-08-221-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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/cmath.rb: new.tadf2008-04-051-0/+223
* 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