From: Taylor R Campbell Date: Wed, 28 Nov 2018 05:18:21 +0000 (+0000) Subject: Add flo:<>, as (or flo:< flo:>) for now. X-Git-Tag: mit-scheme-pucked-10.1.7~3^2~152 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=2da1b601755105a6b16661e4d2eea681e9b63a0d;p=mit-scheme.git Add flo:<>, as (or flo:< flo:>) for now. --- diff --git a/src/runtime/primitive-arithmetic.scm b/src/runtime/primitive-arithmetic.scm index 6d27646f0..d1ab3c8ce 100644 --- a/src/runtime/primitive-arithmetic.scm +++ b/src/runtime/primitive-arithmetic.scm @@ -228,6 +228,7 @@ USA. (define (flo:<= x y) (or (flo:< x y) (flo:= x y))) (define (flo:>= x y) (or (flo:> x y) (flo:= x y))) +(define (flo:<> x y) (or (flo:< x y) (flo:> x y))) (define (flo:min x y) (cond ((flo:< x y) x) diff --git a/src/runtime/runtime.pkg b/src/runtime/runtime.pkg index 3eef506f6..c73ba2b1c 100644 --- a/src/runtime/runtime.pkg +++ b/src/runtime/runtime.pkg @@ -292,6 +292,7 @@ USA. flo:/ flo:< flo:<= + flo:<> flo:= flo:> flo:>= diff --git a/tests/runtime/test-flonum.scm b/tests/runtime/test-flonum.scm index f4b3df766..ef380e254 100644 --- a/tests/runtime/test-flonum.scm +++ b/tests/runtime/test-flonum.scm @@ -48,13 +48,6 @@ USA. ;; XXX Temporary workaround for my setup. (no-traps f)) -(define (flo:<> x y) ;XXX - (if (or (flo:nan? x) (flo:nan? y)) - (begin - (flo:raise-exceptions! (flo:exception:invalid-operation)) - #f) - (not (flo:= x y)))) - (define subnormal+ flo:smallest-positive-subnormal) (define subnormal- (no-traps (lambda () (- subnormal+))))