1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
Commit graph

19 commits

Author SHA1 Message Date
mrkn
9b0b9ac237 * lib/cmath.rb (CMath.sqrt): use floating-point value. [ruby-core:31672] [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
2010-08-11 14:30:47 +00:00
mame
c618db17ee * lib/cmath.rb (CMath#cbrt): cbrt should accept a negative real
numbers.  [ruby-core:31234]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-21 03:43:43 +00:00
tadf
a90469602c * complex.c, rational.c, lib/cmath.rb, lib/date.rb lib/date/delta*:
reverted r27484-27486.  now official spec.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-26 11:14:40 +00:00
tadf
3081e11166 * lib/cmath.rb: reverted experimental r23900.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-25 06:59:45 +00:00
tadf
01971cad75 use num#i.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-16 23:12:41 +00:00
tadf
ad1d5a3c31 * lib/cmath.rb (log2, cbrt): added. [experimental]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-29 16:25:11 +00:00
tadf
c8b995e7ac reverted.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-29 16:22:02 +00:00
tadf
59a9da6443 * complex.c (nucomp_expt): do not use rb_fexpt.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-29 16:20:32 +00:00
tadf
faea8893f8 * lib/cmath.rb (sqrt): fixed an issue [ruby-list:45852]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-28 12:20:02 +00:00
tadf
e03cafe16c * lib/cmath.rb (exp): omitted redundant function call.
and some adjustments.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-11 12:08:30 +00:00
tadf
a6afbaeb3b * lib/cmath.rb (log10): raised exception when the given number is
a negative real.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-09 13:43:49 +00:00
tadf
27174800d4 * lib/cmath.rb (log): avoided redundant expression.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-07 13:46:56 +00:00
tadf
0d7f4ad828 do not pass -infinity.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-11 15:11:14 +00:00
tadf
50c1da22df * lib/cmath.rb (sqrt): should pass nan or infinity to the original
method.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-11 14:49:54 +00:00
tadf
81b1fef56c * lib/cmath.rb (log2,cbrt,frexp,ldexp,hypot,erf,erfc,gamma,lgamma):
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
2008-10-18 22:43:06 +00:00
tadf
9467d7a024 * complex.c: an instance method image has been removed and
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-20 22:49:56 +00:00
tadf
acde7364f7 * numeric.c: provides predicate real? instead of scalar?.
* 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
2008-09-16 22:04:19 +00:00
tadf
8f40b26581 * complex.c (nucomp_div): now behaves as quo.
* 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
2008-08-22 12:27:54 +00:00
tadf
c08b5dfb81 * lib/cmath.rb: new.
* 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
2008-04-05 14:25:40 +00:00