Changeset 8818


Ignore:
Timestamp:
Mar 18, 2008, 3:40:08 AM (11 years ago)
Author:
greg
Message:

Fixed bug #257 (division of bignum by zero not noticed)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-0/l0-numbers.lisp

    r7624 r8818  
    589589
    590590(defun build-ratio (num den)
    591   (if (minusp den)(setq num (- num) den (- den)))
    592   (if (eql den 1)
    593     num
    594     (%make-ratio num den)))
     591  (if (minusp den) (setq num (- num) den (- den)))
     592  (case den
     593    (0 (divide-by-zero-error 'build-ratio num den))
     594    (1 num)
     595    (t (%make-ratio num den))))
    595596
    596597
Note: See TracChangeset for help on using the changeset viewer.