44 |
(long-float |
(long-float |
45 |
(<= #.(rational most-negative-long-float) |
(<= #.(rational most-negative-long-float) |
46 |
x |
x |
47 |
#.(rational most-positive-long-float)))))))) |
#.(rational most-positive-long-float)))))))) |
48 |
|
|
49 |
|
;;; NOTE! According to section 12.1.4.1, when a rational is compared |
50 |
|
;;; to a float, the effect is as if the float is convert to a rational |
51 |
|
;;; (by RATIONAL), not as if the rational is converted to a float. |
52 |
|
;;; This means the calls to numbers-are-compatible are not necessary. |
53 |
|
|
54 |
(defun =.4-fn () |
(defun =.4-fn () |
55 |
(loop for x in *numbers* |
(loop for x in *numbers* |
56 |
append |
append |
57 |
(loop for y in *numbers* |
(loop for y in *numbers* |
58 |
unless (or (not (numbers-are-compatible x y)) |
unless (or ;; (not (numbers-are-compatible x y)) |
59 |
(if (= x y) (= y x) (not (= y x)))) |
(if (= x y) (= y x) (not (= y x)))) |
60 |
collect (list x y)))) |
collect (list x y)))) |
61 |
|
|
63 |
(loop for x in *numbers* |
(loop for x in *numbers* |
64 |
append |
append |
65 |
(loop for y in *numbers* |
(loop for y in *numbers* |
66 |
unless (or (not (numbers-are-compatible x y)) |
unless (or ;; (not (numbers-are-compatible x y)) |
67 |
(if (/= x y) (/= y x) (not (/= y x)))) |
(if (/= x y) (/= y x) (not (/= y x)))) |
68 |
collect (list x y)))) |
collect (list x y)))) |
69 |
|
|
71 |
(loop for x in *numbers* |
(loop for x in *numbers* |
72 |
append |
append |
73 |
(loop for y in *numbers* |
(loop for y in *numbers* |
74 |
when (and (numbers-are-compatible x y) |
when (and ;; (numbers-are-compatible x y) |
75 |
(if (= x y) |
(if (= x y) |
76 |
(/= x y) |
(/= x y) |
77 |
(not (/= x y)))) |
(not (/= x y)))) |
81 |
(loop for x in *reals* |
(loop for x in *reals* |
82 |
nconc |
nconc |
83 |
(loop for y in *reals* |
(loop for y in *reals* |
84 |
when (and (numbers-are-compatible x y) |
when (and ;; (numbers-are-compatible x y) |
85 |
(and (< x y) (> x y))) |
(and (< x y) (> x y))) |
86 |
collect (list x y)))) |
collect (list x y)))) |
87 |
|
|
89 |
(loop for x in *reals* |
(loop for x in *reals* |
90 |
nconc |
nconc |
91 |
(loop for y in *reals* |
(loop for y in *reals* |
92 |
when (and (numbers-are-compatible x y) |
when (and ;; (numbers-are-compatible x y) |
93 |
(if (< x y) (not (> y x)) |
(if (< x y) (not (> y x)) |
94 |
(> y x))) |
(> y x))) |
95 |
collect (list x y)))) |
collect (list x y)))) |
98 |
(loop for x in *reals* |
(loop for x in *reals* |
99 |
nconc |
nconc |
100 |
(loop for y in *reals* |
(loop for y in *reals* |
101 |
when (and (numbers-are-compatible x y) |
when (and ;; (numbers-are-compatible x y) |
102 |
(if (< x y) (>= x y) |
(if (< x y) (>= x y) |
103 |
(not (>= x y)))) |
(not (>= x y)))) |
104 |
collect (list x y)))) |
collect (list x y)))) |
107 |
(loop for x in *reals* |
(loop for x in *reals* |
108 |
nconc |
nconc |
109 |
(loop for y in *reals* |
(loop for y in *reals* |
110 |
when (and (numbers-are-compatible x y) |
when (and ;; (numbers-are-compatible x y) |
111 |
(if (<= x y) (not (>= y x)) |
(if (<= x y) (not (>= y x)) |
112 |
(>= y x))) |
(>= y x))) |
113 |
collect (list x y)))) |
collect (list x y)))) |
116 |
(loop for x in *reals* |
(loop for x in *reals* |
117 |
nconc |
nconc |
118 |
(loop for y in *reals* |
(loop for y in *reals* |
119 |
when (and (numbers-are-compatible x y) |
when (and ;; (numbers-are-compatible x y) |
120 |
(if (<= x y) (not (or (= x y) (< x y))) |
(if (<= x y) (not (or (= x y) (< x y))) |
121 |
(or (= x y) (< x y)))) |
(or (= x y) (< x y)))) |
122 |
collect (list x y)))) |
collect (list x y)))) |
125 |
(loop for x in *reals* |
(loop for x in *reals* |
126 |
nconc |
nconc |
127 |
(loop for y in *reals* |
(loop for y in *reals* |
128 |
when (and (numbers-are-compatible x y) |
when (and ;; (numbers-are-compatible x y) |
129 |
(if (> x y) (<= x y) |
(if (> x y) (<= x y) |
130 |
(not (<= x y)))) |
(not (<= x y)))) |
131 |
collect (list x y)))) |
collect (list x y)))) |
134 |
(loop for x in *reals* |
(loop for x in *reals* |
135 |
nconc |
nconc |
136 |
(loop for y in *reals* |
(loop for y in *reals* |
137 |
when (and (numbers-are-compatible x y) |
when (and ;; (numbers-are-compatible x y) |
138 |
(if (>= x y) (not (or (= x y) (> x y))) |
(if (>= x y) (not (or (= x y) (> x y))) |
139 |
(or (= x y) (> x y)))) |
(or (= x y) (> x y)))) |
140 |
collect (list x y)))) |
collect (list x y)))) |