Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
#include "mathutils.h"
/*****************************************************
* Simple functions using either the Taylor Series
* or the fast function to first compute e^y and e^(-y)
* then find the hyperbolic sine, cosine,
* and tangent of y
*****************************************************/
double dsinh(double y, int fast){
if(fast)
return ((fast_dpowe(y) - fast_dpowe(-y))/2.0);
return ((taylor_dpowe(y)-taylor_dpowe(-y))/2.0);
}
double dcosh(double y, int fast){
if(fast)
return ((fast_dpowe(y) + fast_dpowe(-y))/2.0);
return ((taylor_dpowe(y)+taylor_dpowe(-y))/2.0);
}
double dtanh(double y, int fast){
return(dsinh(y,fast)/dcosh(y,fast));
}