1 /* ******************************************************
 2    *                                                    *
 3    *                                                    *
 4    * Copyright (c) 1972 by Massachusetts Institute of   *
 5    * Technology and Honeywell Information Systems, Inc. *
 6    *                                                    *
 7    *                                                    *
 8    ****************************************************** */
 9 
10 casin_: proc (number) returns (complex float bin (27));
11 
12 dcl (number, a, b, c) complex float bin (27);
13 dcl       (imag, log, real, sqrt) builtin;
14 
15           real (a) = -imag (number) + 0.0e0;
16           imag (a) = real (number) + 0.0e0;
17 
18           b = 1.0e0;
19 
20 trig:
21           c = -1.0e0i;
22 
23 ret:
24           return (log (sqrt (a*a+b)+a)*c);
25 
26 cacos_: entry (number) returns (complex float bin (27));
27 
28           a = number +0.0e0;
29           b = -1.0e0;
30 
31           goto trig;
32 
33 casinh_: entry (number) returns (complex float bin (27));
34 
35           b = 1.0e0;
36 
37 hyper:
38           a = number +0.0e0;
39           c = 1.0e0;
40 
41           goto ret;
42 
43 cacosh_: entry (number) returns (complex float bin (27));
44 
45           b = -1.0e0;
46 
47           goto hyper;
48 
49      end casin_;