Browse Source

xpressn.c: asinh, acosh, atanh replacement functions added

pre-master-46
h_vogt 13 years ago
committed by rlar
parent
commit
e5e08b6f93
  1. 12
      src/frontend/numparam/xpressn.c

12
src/frontend/numparam/xpressn.c

@ -184,13 +184,25 @@ mathfunction(int f, double z, double x)
y = atan(x);
break;
case 31:
#ifdef HAVE_ASINH
y = asinh(x);
#else
y = ((x > 0) ? log(x + sqrt(x * x + 1.0)) : -log(-x + sqrt(x * x + 1.0)));
#endif
break;
case 32:
#ifdef HAVE_ACOSH
y = acosh(x);
#else
y = (log(x + sqrt(x*x-1.0)));
#endif
break;
case 33:
#ifdef HAVE_ATANH
y = atanh(x);
#else
y = (log((1.0 + x) / (1.0 - x)) / 2.0);
#endif
break;
case 34:
y = tan(x);

Loading…
Cancel
Save