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