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

* eval.c (assign): ruby_verbose should be surrounded by RTEST().

* object.c (rb_str2cstr): ditto.

* parse.y (void_expr): ditto.

* parse.y (void_stmts): ditto.

* variable.c (rb_ivar_get): ditto.

* variable.c (rb_cvar_set): ditto.

* variable.c (rb_cvar_get): ditto.

* dir.c (glob_helper): should have proceed link when link->path
  was non existing symbolic link.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2002-04-11 10:03:01 +00:00
parent 3a202ff2b4
commit 5527b3b961
8 changed files with 68 additions and 27 deletions

27
math.c
View file

@ -88,6 +88,15 @@ math_atan(obj, x)
return rb_float_new(atan(RFLOAT(x)->value));
}
#ifndef HAVE_COSH
double
cosh(x)
double x;
{
return (exp(x) + exp(-x)) / 2;
}
#endif
static VALUE
math_cosh(obj, x)
VALUE obj, x;
@ -96,6 +105,15 @@ math_cosh(obj, x)
return rb_float_new(cosh(RFLOAT(x)->value));
}
#ifndef HAVE_SINH
double
sinh(x)
double x;
{
return (exp(x) - exp(-x)) / 2;
}
#endif
static VALUE
math_sinh(obj, x)
VALUE obj, x;
@ -104,6 +122,15 @@ math_sinh(obj, x)
return rb_float_new(sinh(RFLOAT(x)->value));
}
#ifndef HAVE_SINH
double
tanh(x)
double x;
{
return sinh(x) / cosh(x);
}
#endif
static VALUE
math_tanh(obj, x)
VALUE obj, x;