Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions mats/5_3.ms
Original file line number Diff line number Diff line change
Expand Up @@ -1137,6 +1137,7 @@
(error? (< 3.4+0.0i 3.5))
(error? (< 3.2 3.4+0.0i))
(error? (< 3.2 3.3 3.4+0.0i))
(error? (< 1.0+0.0i 0.0+2.0i))
(not (< 3 3))
(< 3 4)
(not (< -3 -3))
Expand Down Expand Up @@ -1197,6 +1198,7 @@
(error? (<= 3.4+0.0i 3.5))
(error? (<= 3.2 3.4+0.0i))
(error? (<= 3.2 3.3 3.4+0.0i))
(error? (<= 1.0+0.0i 0.0+2.0i))
(<= 3 3)
(<= 3 4)
(<= -3 -3)
Expand Down Expand Up @@ -1256,6 +1258,7 @@
(error? (> 3.4+0.0i 3.5))
(error? (> 3.2 3.4+0.0i))
(error? (> 3.2 3.3 3.4+0.0i))
(error? (> 1.0+0.0i 0.0+2.0i))
(not (> 3 3))
(not (> 3 4))
(not (> -3 -3))
Expand Down Expand Up @@ -1315,6 +1318,7 @@
(error? (>= 3.4+0.0i 3.5))
(error? (>= 3.2 3.4+0.0i))
(error? (>= 3.2 3.3 3.4+0.0i))
(error? (>= 1.0+0.0i 0.0+2.0i))
(>= 3 3)
(not (>= 3 4))
(>= -3 -3)
Expand Down Expand Up @@ -1417,6 +1421,7 @@
(error? (r6rs:< 'a 3 4))
(error? (r6rs:< 4 'a 3))
(error? (r6rs:< 3 5 'a 4))
(error? (r6rs:< 1.0+0.0i 0.0+2.0i))
(not (r6rs:< 3 3))
(r6rs:< 3 4)
(not (r6rs:< -3 -3))
Expand Down Expand Up @@ -1467,6 +1472,7 @@
(error? (r6rs:<= 'a 3 4))
(error? (r6rs:<= 4 'a 3))
(error? (r6rs:<= 3 5 'a 4))
(error? (r6rs:<= 1.0+0.0i 0.0+2.0i))
(r6rs:<= 3 3)
(r6rs:<= 3 4)
(r6rs:<= -3 -3)
Expand Down Expand Up @@ -1517,6 +1523,7 @@
(error? (r6rs:> 'a 3 4))
(error? (r6rs:> 4 'a 3))
(error? (r6rs:> 3 5 'a 4))
(error? (r6rs:> 1.0+0.0i 0.0+2.0i))
(not (r6rs:> 3 3))
(not (r6rs:> 3 4))
(not (r6rs:> -3 -3))
Expand Down Expand Up @@ -1567,6 +1574,7 @@
(error? (r6rs:>= 'a 3 4))
(error? (r6rs:>= 4 'a 3))
(error? (r6rs:>= 3 5 'a 4))
(error? (r6rs:>= 1.0+0.0i 0.0+2.0i))
(r6rs:>= 3 3)
(not (r6rs:>= 3 4))
(r6rs:>= -3 -3)
Expand Down
8 changes: 8 additions & 0 deletions mats/root-experr-compile-0-f-f-f
Original file line number Diff line number Diff line change
Expand Up @@ -1030,6 +1030,7 @@ primvars.mo:Expected error in mat trace-output-port: "trace-output-port: #<input
5_3.mo:Expected error in mat <: "<: 3.4+0.0i is not a real number".
5_3.mo:Expected error in mat <: "<: 3.4+0.0i is not a real number".
5_3.mo:Expected error in mat <: "<: 3.4+0.0i is not a real number".
5_3.mo:Expected error in mat <: "<: 1.0+0.0i is not a real number".
5_3.mo:Expected error in mat <: "<: 2.0+1.0i is not a real number".
5_3.mo:Expected error in mat <: "<: 2+1i is not a real number".
5_3.mo:Expected error in mat <: "<: 3+1i is not a real number".
Expand All @@ -1050,6 +1051,7 @@ primvars.mo:Expected error in mat trace-output-port: "trace-output-port: #<input
5_3.mo:Expected error in mat <=: "<=: 3.4+0.0i is not a real number".
5_3.mo:Expected error in mat <=: "<=: 3.4+0.0i is not a real number".
5_3.mo:Expected error in mat <=: "<=: 3.4+0.0i is not a real number".
5_3.mo:Expected error in mat <=: "<=: 1.0+0.0i is not a real number".
5_3.mo:Expected error in mat <=: "<=: 2.0+1.0i is not a real number".
5_3.mo:Expected error in mat <=: "<=: 2+1i is not a real number".
5_3.mo:Expected error in mat <=: "<=: 3+1i is not a real number".
Expand All @@ -1070,6 +1072,7 @@ primvars.mo:Expected error in mat trace-output-port: "trace-output-port: #<input
5_3.mo:Expected error in mat >: ">: 3.4+0.0i is not a real number".
5_3.mo:Expected error in mat >: ">: 3.4+0.0i is not a real number".
5_3.mo:Expected error in mat >: ">: 3.4+0.0i is not a real number".
5_3.mo:Expected error in mat >: ">: 1.0+0.0i is not a real number".
5_3.mo:Expected error in mat >: ">: 2.0+1.0i is not a real number".
5_3.mo:Expected error in mat >: ">: 2+1i is not a real number".
5_3.mo:Expected error in mat >: ">: 3+1i is not a real number".
Expand All @@ -1090,6 +1093,7 @@ primvars.mo:Expected error in mat trace-output-port: "trace-output-port: #<input
5_3.mo:Expected error in mat >=: ">=: 3.4+0.0i is not a real number".
5_3.mo:Expected error in mat >=: ">=: 3.4+0.0i is not a real number".
5_3.mo:Expected error in mat >=: ">=: 3.4+0.0i is not a real number".
5_3.mo:Expected error in mat >=: ">=: 1.0+0.0i is not a real number".
5_3.mo:Expected error in mat >=: ">=: 2.0+1.0i is not a real number".
5_3.mo:Expected error in mat >=: ">=: 2+1i is not a real number".
5_3.mo:Expected error in mat >=: ">=: 3+1i is not a real number".
Expand All @@ -1111,6 +1115,7 @@ primvars.mo:Expected error in mat trace-output-port: "trace-output-port: #<input
5_3.mo:Expected error in mat r6rs:<: "<: a is not a real number".
5_3.mo:Expected error in mat r6rs:<: "<: a is not a real number".
5_3.mo:Expected error in mat r6rs:<: "<: a is not a real number".
5_3.mo:Expected error in mat r6rs:<: "<: 1.0+0.0i is not a real number".
5_3.mo:Expected error in mat r6rs:<: "<: 2.0+1.0i is not a real number".
5_3.mo:Expected error in mat r6rs:<: "<: 2+1i is not a real number".
5_3.mo:Expected error in mat r6rs:<: "<: 3+1i is not a real number".
Expand All @@ -1123,6 +1128,7 @@ primvars.mo:Expected error in mat trace-output-port: "trace-output-port: #<input
5_3.mo:Expected error in mat r6rs:<=: "<=: a is not a real number".
5_3.mo:Expected error in mat r6rs:<=: "<=: a is not a real number".
5_3.mo:Expected error in mat r6rs:<=: "<=: a is not a real number".
5_3.mo:Expected error in mat r6rs:<=: "<=: 1.0+0.0i is not a real number".
5_3.mo:Expected error in mat r6rs:<=: "<=: 2.0+1.0i is not a real number".
5_3.mo:Expected error in mat r6rs:<=: "<=: 2+1i is not a real number".
5_3.mo:Expected error in mat r6rs:<=: "<=: 3+1i is not a real number".
Expand All @@ -1135,6 +1141,7 @@ primvars.mo:Expected error in mat trace-output-port: "trace-output-port: #<input
5_3.mo:Expected error in mat r6rs:>: ">: a is not a real number".
5_3.mo:Expected error in mat r6rs:>: ">: a is not a real number".
5_3.mo:Expected error in mat r6rs:>: ">: a is not a real number".
5_3.mo:Expected error in mat r6rs:>: ">: 1.0+0.0i is not a real number".
5_3.mo:Expected error in mat r6rs:>: ">: 2.0+1.0i is not a real number".
5_3.mo:Expected error in mat r6rs:>: ">: 2+1i is not a real number".
5_3.mo:Expected error in mat r6rs:>: ">: 3+1i is not a real number".
Expand All @@ -1147,6 +1154,7 @@ primvars.mo:Expected error in mat trace-output-port: "trace-output-port: #<input
5_3.mo:Expected error in mat r6rs:>=: ">=: a is not a real number".
5_3.mo:Expected error in mat r6rs:>=: ">=: a is not a real number".
5_3.mo:Expected error in mat r6rs:>=: ">=: a is not a real number".
5_3.mo:Expected error in mat r6rs:>=: ">=: 1.0+0.0i is not a real number".
5_3.mo:Expected error in mat r6rs:>=: ">=: 2.0+1.0i is not a real number".
5_3.mo:Expected error in mat r6rs:>=: ">=: 2+1i is not a real number".
5_3.mo:Expected error in mat r6rs:>=: ">=: 3+1i is not a real number".
Expand Down
7 changes: 7 additions & 0 deletions release_notes/release_notes.stex
Original file line number Diff line number Diff line change
Expand Up @@ -2897,6 +2897,13 @@ in fasl files does not generally make sense.
%-----------------------------------------------------------------------------
\section{Bug Fixes}\label{section:bugfixes}

\subsection{Corrections and refinements to error reporting (10.4.0)}

Changed \scheme{>} and \scheme{>=} when applied to two non-real
arguments to report the first argument as wrong, instead of the second
(even though there is no general guarantee about which argument is
reported in errors).

\subsection{Exit with failure on error from boot file (10.3.0)}

When an error is encountered within a boot file---either raised
Expand Down
14 changes: 12 additions & 2 deletions s/5_3.ss
Original file line number Diff line number Diff line change
Expand Up @@ -2379,7 +2379,12 @@
[(fixnum?) (if (fixnum-floatable-wlop? y) (fl< x (fixnum->flonum y)) (exact-inexact-compare? > y x))]
[(bignum? ratnum?) (exact-inexact-compare? > y x)]
[else (nonreal-error who y)])]
[else (nonreal-error who x)])))
[else (when (and (eq? who '>)
;; arguments were reversed; call in other order to
;; check original first argument first
(not (real? y)))
(nonreal-error who y))
(nonreal-error who x)])))

(set! $<=
(lambda (who x y)
Expand Down Expand Up @@ -2415,7 +2420,12 @@
[(fixnum?) (if (fixnum-floatable-wlop? y) (fl<= x (fixnum->flonum y)) (exact-inexact-compare? >= y x))]
[(bignum? ratnum?) (exact-inexact-compare? >= y x)]
[else (nonreal-error who y)])]
[else (nonreal-error who x)])))
[else (when (and (eq? who '>=)
;; arguments were reversed; call in other order to
;; check original first argument first
(not (real? y)))
(nonreal-error who y))
(nonreal-error who x)])))

(set! $+
(lambda (who x y)
Expand Down