1 /* ****************************************************** 2 * * 3 * * 4 * Copyright (c) 1972 by Massachusetts Institute of * 5 * Technology and Honeywell Information Systems, Inc. * 6 * * 7 * * 8 ****************************************************** */ 9 10 dcabs_: proc (number) returns (float bin (63)); 11 12 dcl number complex float bin (63), 13 (abs, imag, real, sqrt) builtin, 14 (r, x, y) float bin (63); 15 16 r, 17 x = abs (real (number)); 18 y = abs (imag (number)); 19 20 if y<x 21 then do; 22 x = y; 23 y = r; 24 end; 25 26 if y ^= 0.0e0 27 then do; 28 r = x/y; 29 y = sqrt (r*r+1.0e0)*y; 30 end; 31 32 return (y); 33 34 end dcabs_;