summaryrefslogtreecommitdiff
path: root/math.c
diff options
context:
space:
mode:
Diffstat (limited to 'math.c')
-rw-r--r--math.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/math.c b/math.c
index 4af3cef96e..c900a0b7aa 100644
--- a/math.c
+++ b/math.c
@@ -113,6 +113,30 @@ math_tanh(obj, x)
}
static VALUE
+math_acosh(obj, x)
+ VALUE obj, x;
+{
+ Need_Float(x);
+ return rb_float_new(acosh(RFLOAT(x)->value));
+}
+
+static VALUE
+math_asinh(obj, x)
+ VALUE obj, x;
+{
+ Need_Float(x);
+ return rb_float_new(asinh(RFLOAT(x)->value));
+}
+
+static VALUE
+math_atanh(obj, x)
+ VALUE obj, x;
+{
+ Need_Float(x);
+ return rb_float_new(atanh(RFLOAT(x)->value));
+}
+
+static VALUE
math_exp(obj, x)
VALUE obj, x;
{
@@ -212,6 +236,10 @@ Init_Math()
rb_define_module_function(rb_mMath, "sinh", math_sinh, 1);
rb_define_module_function(rb_mMath, "tanh", math_tanh, 1);
+ rb_define_module_function(rb_mMath, "acosh", math_acosh, 1);
+ rb_define_module_function(rb_mMath, "asinh", math_asinh, 1);
+ rb_define_module_function(rb_mMath, "atanh", math_atanh, 1);
+
rb_define_module_function(rb_mMath, "exp", math_exp, 1);
rb_define_module_function(rb_mMath, "log", math_log, 1);
rb_define_module_function(rb_mMath, "log10", math_log10, 1);