trivial changes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
28a04df7bb
commit
2897cdae9b
30
complex.c
30
complex.c
@ -456,29 +456,31 @@ m_log_bang(VALUE x)
|
|||||||
static VALUE
|
static VALUE
|
||||||
m_cos(VALUE x)
|
m_cos(VALUE x)
|
||||||
{
|
{
|
||||||
get_dat1(x);
|
|
||||||
|
|
||||||
if (f_real_p(x))
|
if (f_real_p(x))
|
||||||
return m_cos_bang(x);
|
return m_cos_bang(x);
|
||||||
return f_complex_new2(rb_cComplex,
|
{
|
||||||
f_mul(m_cos_bang(dat->real),
|
get_dat1(x);
|
||||||
m_cosh_bang(dat->imag)),
|
return f_complex_new2(rb_cComplex,
|
||||||
f_mul(f_negate(m_sin_bang(dat->real)),
|
f_mul(m_cos_bang(dat->real),
|
||||||
m_sinh_bang(dat->imag)));
|
m_cosh_bang(dat->imag)),
|
||||||
|
f_mul(f_negate(m_sin_bang(dat->real)),
|
||||||
|
m_sinh_bang(dat->imag)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
m_sin(VALUE x)
|
m_sin(VALUE x)
|
||||||
{
|
{
|
||||||
get_dat1(x);
|
|
||||||
|
|
||||||
if (f_real_p(x))
|
if (f_real_p(x))
|
||||||
return m_sin_bang(x);
|
return m_sin_bang(x);
|
||||||
return f_complex_new2(rb_cComplex,
|
{
|
||||||
f_mul(m_sin_bang(dat->real),
|
get_dat1(x);
|
||||||
m_cosh_bang(dat->imag)),
|
return f_complex_new2(rb_cComplex,
|
||||||
f_mul(m_cos_bang(dat->real),
|
f_mul(m_sin_bang(dat->real),
|
||||||
m_sinh_bang(dat->imag)));
|
m_cosh_bang(dat->imag)),
|
||||||
|
f_mul(m_cos_bang(dat->real),
|
||||||
|
m_sinh_bang(dat->imag)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user