From 54a7db007fbb4b5f8eff5e7df0f866fa032849c6 Mon Sep 17 00:00:00 2001 From: yugui Date: Wed, 29 Oct 2008 16:09:14 +0000 Subject: merged r20005 and r20007 from trunk into ruby_1_9_1. * math.c (rb_math_{atan2,cos,cosh,hypot,log,sin,sinh,sqrt}): added. * complex.c: follows the above change. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@20032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- complex.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'complex.c') diff --git a/complex.c b/complex.c index e59554ede..d59305eb1 100644 --- a/complex.c +++ b/complex.c @@ -426,31 +426,31 @@ nucomp_f_complex(int argc, VALUE *argv, VALUE klass) return rb_funcall2(rb_cComplex, id_convert, argc, argv); } -extern VALUE math_atan2(VALUE obj, VALUE x, VALUE y); -extern VALUE math_cos(VALUE obj, VALUE x); -extern VALUE math_cosh(VALUE obj, VALUE x); -extern VALUE math_exp(VALUE obj, VALUE x); -extern VALUE math_hypot(VALUE obj, VALUE x, VALUE y); -extern VALUE math_log(int argc, VALUE *argv); -extern VALUE math_sin(VALUE obj, VALUE x); -extern VALUE math_sinh(VALUE obj, VALUE x); -extern VALUE math_sqrt(VALUE obj, VALUE x); - -#define m_atan2_bang(x,y) math_atan2(Qnil,x,y) -#define m_cos_bang(x) math_cos(Qnil,x) -#define m_cosh_bang(x) math_cosh(Qnil,x) -#define m_exp_bang(x) math_exp(Qnil,x) -#define m_hypot(x,y) math_hypot(Qnil,x,y) +extern VALUE rb_math_atan2(VALUE x, VALUE y); +extern VALUE rb_math_cos(VALUE x); +extern VALUE rb_math_cosh(VALUE x); +extern VALUE rb_math_exp(VALUE x); +extern VALUE rb_math_hypot(VALUE x, VALUE y); +extern VALUE rb_math_log(int argc, VALUE *argv); +extern VALUE rb_math_sin(VALUE x); +extern VALUE rb_math_sinh(VALUE x); +extern VALUE rb_math_sqrt(VALUE x); + +#define m_atan2_bang(x,y) rb_math_atan2(x,y) +#define m_cos_bang(x) rb_math_cos(x) +#define m_cosh_bang(x) rb_math_cosh(x) +#define m_exp_bang(x) rb_math_exp(x) +#define m_hypot(x,y) rb_math_hypot(x,y) static VALUE m_log_bang(VALUE x) { - return math_log(1, &x); + return rb_math_log(1, &x); } -#define m_sin_bang(x) math_sin(Qnil,x) -#define m_sinh_bang(x) math_sinh(Qnil,x) -#define m_sqrt_bang(x) math_sqrt(Qnil,x) +#define m_sin_bang(x) rb_math_sin(x) +#define m_sinh_bang(x) rb_math_sinh(x) +#define m_sqrt_bang(x) rb_math_sqrt(x) static VALUE m_cos(VALUE x) -- cgit