Commit 38526297 authored by pfdietz's avatar pfdietz
Browse files

More fixes of incompatible float/rational comparisons.

parent 9dfc672d
...@@ -153,19 +153,21 @@ ...@@ -153,19 +153,21 @@
(loop for x in *reals* (loop for x in *reals*
nconc nconc
(loop for y in *reals* (loop for y in *reals*
for m = (max x y) when (numbers-are-compatible x y)
unless (and (>= m x) (>= m y) unless (let ((m (max x y)))
(or (= m x) (= m y))) (and (>= m x) (>= m y)
collect (list x y m)))) (or (= m x) (= m y))))
collect (list x y (max x y)))))
(defun min.2-fn () (defun min.2-fn ()
(loop for x in *reals* (loop for x in *reals*
nconc nconc
(loop for y in *reals* (loop for y in *reals*
for m = (min x y) when (numbers-are-compatible x y)
unless (and (<= m x) (<= m y) unless (let ((m (min x y)))
(or (= m x) (= m y))) (and (<= m x) (<= m y)
collect (list x y m)))) (or (= m x) (= m y))))
collect (list x y (min x y)))))
(defun random-nonnegative-real () (defun random-nonnegative-real ()
(if (coin 3) (if (coin 3)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment