1 /* ******************************************************
 2    *                                                    *
 3    *                                                    *
 4    * Copyright (c) 1974 by Massachusetts Institute of   *
 5    * Technology and Honeywell Information Systems, Inc. *
 6    *                                                    *
 7    *                                                    *
 8    ****************************************************** */
 9 
10 dasin_: procedure (number) returns (float binary (63));
11 
12 /*     compute the arcsine, arccosine, or arctangent of a double-precision floating-point number     */
13 
14 declare   (number, value) float binary (63),
15           code_ entry(fixed bin),
16           (abs, atan, atand, sqrt) builtin;
17 
18           value = number;
19           if abs(value) > 1.e0 then go to out_of_range;
20           return(atan(value, sqrt(-value*value+1.e0)));
21 
22 dacos_:   entry(number) returns(float bin(63));
23           value = number;
24           if abs(value) > 1.e0
25           then do;
26 
27 out_of_range:
28                call code_(58);
29                return (0e0);
30                end;
31           return(atan(sqrt(-value*value+1.e0), value));
32 
33 dasind_:  entry(number) returns(float bin(63));
34           value = number;
35           if abs(value) > 1.e0 then go to out_of_range;
36           return(atand(value, sqrt(-value*value+1.e0)));
37 
38 dacosd_:  entry(number) returns(float bin(63));
39           value = number;
40           if abs(value) > 1.e0 then go to out_of_range;
41           return(atand(sqrt(-value*value+1.e0), value));
42 
43 datan_:   entry(number) returns(float bin(63));
44           value = number;
45           return(atan(value));
46 
47 datand_:  entry(number) returns(float bin(63));
48           value = number;
49           return(atand(value));
50           end;