1 /* ******************************************************
 2    *                                                    *
 3    *                                                    *
 4    * Copyright (c) 1972 by Massachusetts Institute of   *
 5    * Technology and Honeywell Information Systems, Inc. *
 6    *                                                    *
 7    *                                                    *
 8    ****************************************************** */
 9 
10 dclog_: proc (number) returns (complex float bin (63));
11 
12 dcl (number, a, b) complex float bin (63);
13 
14 dcl  code_ ext entry (fixed bin (17)),
15           (abs, atan, imag, log, real) builtin;
16 
17           a = number;
18           if a = 0.0e0
19                then do;
20                call code_ (31);
21                return (170141182.0e30);
22           end;
23 
24           imag (b) = atan(imag (a), real (a));
25           real (b) = log (abs (a));
26 
27           return (b);
28 
29      end dclog_;