Changeset 273
- Timestamp:
- Jan 13, 2004, 4:48:27 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/ccl/lib/numbers.lisp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ccl/lib/numbers.lisp
r251 r273 344 344 (let* ((small (if (< n0 n1) n0 n1)) 345 345 (large (if (eq small n0) n1 n0))) 346 ( * (truncate large (gcd n0 n1)) small))))))346 (values (truncate (abs (* n0 n1)) (gcd large small)))))))) 347 347 348 348 (defun lcm (&lexpr numbers) … … 544 544 545 545 (defun signum (x) 546 (cond ((complexp x) ( cis (phase x)))546 (cond ((complexp x) (if (zerop x) x (/ x (abs x)))) 547 547 ((rationalp x) (if (plusp x) 1 (if (zerop x) 0 -1))) 548 548 ((zerop x) (float 0.0 x))
Note:
See TracChangeset
for help on using the changeset viewer.
