34 SAVE atnhcs, nterms, dxrel, sqeps, first
35 DATA atnhcs( 1) / .0943951023 93195492e0 /
36 DATA atnhcs( 2) / .0491984370 55786159e0 /
37 DATA atnhcs( 3) / .0021025935 22455432e0 /
38 DATA atnhcs( 4) / .0001073554 44977611e0 /
39 DATA atnhcs( 5) / .0000059782 67249293e0 /
40 DATA atnhcs( 6) / .0000003505 06203088e0 /
41 DATA atnhcs( 7) / .0000000212 63743437e0 /
42 DATA atnhcs( 8) / .0000000013 21694535e0 /
43 DATA atnhcs( 9) / .0000000000 83658755e0 /
44 DATA atnhcs(10) / .0000000000 05370503e0 /
45 DATA atnhcs(11) / .0000000000 00348665e0 /
46 DATA atnhcs(12) / .0000000000 00022845e0 /
47 DATA atnhcs(13) / .0000000000 00001508e0 /
48 DATA atnhcs(14) / .0000000000 00000100e0 /
49 DATA atnhcs(15) / .0000000000 00000006e0 /
53 nterms =
inits(atnhcs, 15, 0.1*r1mach(3))
54 dxrel =
sqrt(r1mach(4))
55 sqeps =
sqrt(3.0*r1mach(3))
62 atanh = (x - x) / (x - x)
69 IF (1.0-y .LT. dxrel) CALL
xermsg(
'SLATEC',
'ATANH',
70 +
'ANSWER LT HALF PRECISION BECAUSE ABS(X) TOO NEAR 1', 1, 1)
73 IF (y.GT.sqeps .AND. y.LE.0.5)
atanh = x*(1.0 +
csevl(8.*x*x-1.,
75 IF (y.GT.0.5)
atanh = 0.5*
log((1.0+x)/(1.0-x))
function inits(OS, NOS, ETA)
std::string dimension(void) const
octave_value log(void) const
subroutine xermsg(LIBRAR, SUBROU, MESSG, NERR, LEVEL)
octave_value sqrt(void) const