/*Copyright (C) 1997 by Thomas Glen Smith. All Rights Reserved.*/ /* atanhx APL2 V1.0.0 ************************************************** * Hyperbolic arc-tangent for complex numbers. * ***********************************************************************/ #define INCLUDES MATH #include "includes.h" void atanhx(rite,ret) double *rite,*ret; { Logx; double wa[2],wb[2],wc[2]; static double one[2]={1.0,0.0}, two[2]={2.0,0.0}; plusx(one,rite,wa); /* 1+x */ minusx(one,rite,wb); /* 1-x */ dividex(wa,wb,wc); /* (1+x)/(1-x) */ logx(wc,wa); /* ln((1+x)/(1-x)) */ dividex(wa,two,ret); /* (ln((1+x)/(1-x)))/2 */ }