1
2
3
4
5
6
7
8
9
10
11
12 asinh_: procedure (number) returns (float binary (27));
13
14
15 declare (number, r) float binary (27),
16 (f, n, p) float binary (63);
17 dcl code_ ext entry (fixed bin),
18 (abs, log, round, sqrt) builtin;
19 p = 1.e0;
20 n = number;
21 f = abs (n);
22 r = f;
23 if f < 5.e-5 then go to negate;
24 asinhs: if f >= 11586.e0 then p = f;
25 else p = sqrt (f*f + p);
26 p = p + f - 1.e0;
27 r = round (p, 28);
28 r = log (r+1);
29 negate: if n < 0.0e0 then r = -r;
30 return (r);
31 acosh_: entry (number) returns (float binary (27));
32 p = -1.e0;
33 n, f = abs (number);
34 if f >= 1.e0 then go to asinhs;
35 call code_ (34);
36 return (0.0e0);
37 end asinh_;