2 DOUBLE PRECISION FUNCTION d9lgmc (X)
35 DOUBLE PRECISION X, ALGMCS(15), XBIG, XMAX, DCSEVL, D1MACH
37 SAVE algmcs, nalgm, xbig, xmax, first
38 DATA algmcs( 1) / +.1666389480 4518632472 0572965082 2 d+0 /
39 DATA algmcs( 2) / -.1384948176 0675638407 3298605913 5 d-4 /
40 DATA algmcs( 3) / +.9810825646 9247294261 5717154748 7 d-8 /
41 DATA algmcs( 4) / -.1809129475 5724941942 6330626671 9 d-10 /
42 DATA algmcs( 5) / +.6221098041 8926052271 2601554341 6 d-13 /
43 DATA algmcs( 6) / -.3399615005 4177219443 0333059966 6 d-15 /
44 DATA algmcs( 7) / +.2683181998 4826987489 5753884666 6 d-17 /
45 DATA algmcs( 8) / -.2868042435 3346432841 4462239999 9 d-19 /
46 DATA algmcs( 9) / +.3962837061 0464348036 7930666666 6 d-21 /
47 DATA algmcs( 10) / -.6831888753 9857668701 1199999999 9 d-23 /
48 DATA algmcs( 11) / +.1429227355 9424981475 7333333333 3 d-24 /
49 DATA algmcs( 12) / -.3547598158 1010705471 9999999999 9 d-26 /
50 DATA algmcs( 13) / +.1025680058 0104709120 0000000000 0 d-27 /
51 DATA algmcs( 14) / -.3401102254 3167487999 9999999999 9 d-29 /
52 DATA algmcs( 15) / +.1276642195 6300629333 3333333333 3 d-30 /
56 nalgm =
initds(algmcs, 15,
REAL(D1MACH(3)) )
57 xbig = 1.0d0/
sqrt(d1mach(3))
58 xmax =
exp(
min(
log(d1mach(2)/12.d0), -
log(12.d0*d1mach(1))))
62 IF (x .LT. 10.d0) CALL
xermsg(
'SLATEC',
'D9LGMC',
63 +
'X MUST BE GE 10', 1, 2)
64 IF (x.GE.xmax) go to 20
67 IF (x.LT.xbig)
d9lgmc = dcsevl(2.0d0*(10.d0/x)**2-1.d0, algmcs,
72 CALL
xermsg(
'SLATEC',
'D9LGMC',
'X SO BIG D9LGMC UNDERFLOWS', 2,
double precision function d9lgmc(X)
octave_value log(void) const
function initds(OS, NOS, ETA)
subroutine xermsg(LIBRAR, SUBROU, MESSG, NERR, LEVEL)
octave_value sqrt(void) const
charNDArray min(char d, const charNDArray &m)