1 /* ******************************************************
 2    *                                                    *
 3    *                                                    *
 4    * Copyright (c) 1972 by Massachusetts Institute of   *
 5    * Technology and Honeywell Information Systems, Inc. *
 6    *                                                    *
 7    *                                                    *
 8    ****************************************************** */
 9 
10 dcexp_: proc (number) returns (complex float bin (63));
11 
12 dcl (number, a, r) complex float bin (63);
13 
14 dcl       (abs, cos, exp, imag, real, sin) builtin;
15 
16 dcl  code_ ext entry (fixed bin (17));
17 
18           a = number;
19 
20           if real (a)>88.028e0
21                then do;
22                call code_ (68);
23 
24                real (a) = 170141182.0e30;
25           end;
26           else real (a) = exp (real (a));
27 
28           if abs (imag (a)) >= 18104398509481984.0e0
29                then do;
30                call code_ (69);
31 
32                return (0.0e0);
33           end;
34 
35           imag (r) = sin (imag (a))*real (a);
36           real (r) = cos (imag (a))*real (a);
37 
38           return (r);
39 
40      end dcexp_;