44 dimension erfcs(13), erfccs(24), erc2cs(23)
46 SAVE erfcs, erc2cs, erfccs, sqrtpi, nterf, nterfc,
47 1 nterc2, xsml, xmax, sqeps, first
48 DATA erfcs( 1) / -.0490461212 34691808e0 /
49 DATA erfcs( 2) / -.1422612051 0371364e0 /
50 DATA erfcs( 3) / .0100355821 87599796e0 /
51 DATA erfcs( 4) / -.0005768764 69976748e0 /
52 DATA erfcs( 5) / .0000274199 31252196e0 /
53 DATA erfcs( 6) / -.0000011043 17550734e0 /
54 DATA erfcs( 7) / .0000000384 88755420e0 /
55 DATA erfcs( 8) / -.0000000011 80858253e0 /
56 DATA erfcs( 9) / .0000000000 32334215e0 /
57 DATA erfcs(10) / -.0000000000 00799101e0 /
58 DATA erfcs(11) / .0000000000 00017990e0 /
59 DATA erfcs(12) / -.0000000000 00000371e0 /
60 DATA erfcs(13) / .0000000000 00000007e0 /
61 DATA erc2cs( 1) / -.0696013466 02309501e0 /
62 DATA erc2cs( 2) / -.0411013393 62620893e0 /
63 DATA erc2cs( 3) / .0039144958 66689626e0 /
64 DATA erc2cs( 4) / -.0004906395 65054897e0 /
65 DATA erc2cs( 5) / .0000715747 90013770e0 /
66 DATA erc2cs( 6) / -.0000115307 16341312e0 /
67 DATA erc2cs( 7) / .0000019946 70590201e0 /
68 DATA erc2cs( 8) / -.0000003642 66647159e0 /
69 DATA erc2cs( 9) / .0000000694 43726100e0 /
70 DATA erc2cs(10) / -.0000000137 12209021e0 /
71 DATA erc2cs(11) / .0000000027 88389661e0 /
72 DATA erc2cs(12) / -.0000000005 81416472e0 /
73 DATA erc2cs(13) / .0000000001 23892049e0 /
74 DATA erc2cs(14) / -.0000000000 26906391e0 /
75 DATA erc2cs(15) / .0000000000 05942614e0 /
76 DATA erc2cs(16) / -.0000000000 01332386e0 /
77 DATA erc2cs(17) / .0000000000 00302804e0 /
78 DATA erc2cs(18) / -.0000000000 00069666e0 /
79 DATA erc2cs(19) / .0000000000 00016208e0 /
80 DATA erc2cs(20) / -.0000000000 00003809e0 /
81 DATA erc2cs(21) / .0000000000 00000904e0 /
82 DATA erc2cs(22) / -.0000000000 00000216e0 /
83 DATA erc2cs(23) / .0000000000 00000052e0 /
84 DATA erfccs( 1) / 0.0715179310 202925e0 /
85 DATA erfccs( 2) / -.0265324343 37606719e0 /
86 DATA erfccs( 3) / .0017111539 77920853e0 /
87 DATA erfccs( 4) / -.0001637516 63458512e0 /
88 DATA erfccs( 5) / .0000198712 93500549e0 /
89 DATA erfccs( 6) / -.0000028437 12412769e0 /
90 DATA erfccs( 7) / .0000004606 16130901e0 /
91 DATA erfccs( 8) / -.0000000822 77530261e0 /
92 DATA erfccs( 9) / .0000000159 21418724e0 /
93 DATA erfccs(10) / -.0000000032 95071356e0 /
94 DATA erfccs(11) / .0000000007 22343973e0 /
95 DATA erfccs(12) / -.0000000001 66485584e0 /
96 DATA erfccs(13) / .0000000000 40103931e0 /
97 DATA erfccs(14) / -.0000000000 10048164e0 /
98 DATA erfccs(15) / .0000000000 02608272e0 /
99 DATA erfccs(16) / -.0000000000 00699105e0 /
100 DATA erfccs(17) / .0000000000 00192946e0 /
101 DATA erfccs(18) / -.0000000000 00054704e0 /
102 DATA erfccs(19) / .0000000000 00015901e0 /
103 DATA erfccs(20) / -.0000000000 00004729e0 /
104 DATA erfccs(21) / .0000000000 00001432e0 /
105 DATA erfccs(22) / -.0000000000 00000439e0 /
106 DATA erfccs(23) / .0000000000 00000138e0 /
107 DATA erfccs(24) / -.0000000000 00000048e0 /
108 DATA sqrtpi /1.772453850 9055160e0/
113 nterf =
inits(erfcs, 13, eta)
114 nterfc =
inits(erfccs, 24, eta)
115 nterc2 =
inits(erc2cs, 23, eta)
117 xsml = -
sqrt(-
log(sqrtpi*r1mach(3)))
118 txmax =
sqrt(-
log(sqrtpi*r1mach(1)))
119 xmax = txmax - 0.5*
log(txmax)/txmax - 0.01
120 sqeps =
sqrt(2.0*r1mach(3))
129 IF (x.GT.xsml) go to 20
136 20
IF (x.GT.xmax) go to 40
138 IF (y.GT.1.0) go to 30
142 IF (y.LT.sqeps)
erfc = 1.0 - 2.0*x/sqrtpi
143 IF (y.GE.sqeps)
erfc = 1.0 -
144 1 x*(1.0 +
csevl(2.*x*x-1., erfcs, nterf) )
function inits(OS, NOS, ETA)
std::string dimension(void) const
octave_value log(void) const
octave_value sqrt(void) const
boolNDArray isnan(void) const