Bind clojure.core/float (= double on Chez)

Chez has no single-float type, so float coerces to a flonum like double.
Corpus 2683->2684; floor raised.
This commit is contained in:
Yogthos 2026-06-21 15:39:21 -04:00
parent cf0b544baf
commit f6937dd7df
2 changed files with 4 additions and 2 deletions

View file

@ -141,4 +141,6 @@
;; math/trunc; char -> code point). Distinct cell so (long ...) resolves. ;; math/trunc; char -> code point). Distinct cell so (long ...) resolves.
(def-var! "clojure.core" "long" jolt-int) (def-var! "clojure.core" "long" jolt-int)
(def-var! "clojure.core" "double" jolt-double) (def-var! "clojure.core" "double" jolt-double)
;; float: Chez has no single-float type, so float coerces to a flonum like double.
(def-var! "clojure.core" "float" jolt-double)
(def-var! "clojure.core" "compare" jolt-compare) (def-var! "clojure.core" "compare" jolt-compare)

View file

@ -11,7 +11,7 @@
;; reset between cases so there is no leakage — same isolation a fresh process gives. ;; reset between cases so there is no leakage — same isolation a fresh process gives.
;; ;;
;; chez --script host/chez/run-corpus.ss ;; chez --script host/chez/run-corpus.ss
;; JOLT_CHEZ_ZJ_FLOOR=N override the regression floor (default 2683) ;; JOLT_CHEZ_ZJ_FLOOR=N override the regression floor (default 2684)
;; JOLT_CORPUS_LIMIT=N every-Nth stride (fast iteration; floor drops to 0) ;; JOLT_CORPUS_LIMIT=N every-Nth stride (fast iteration; floor drops to 0)
;; JOLT_DUMP_CRASH_LABELS=1 list crash + allowlisted labels ;; JOLT_DUMP_CRASH_LABELS=1 list crash + allowlisted labels
(import (chezscheme)) (import (chezscheme))
@ -202,7 +202,7 @@
;; Regression floor: fail on any NEW divergence or if pass drops below the floor. ;; Regression floor: fail on any NEW divergence or if pass drops below the floor.
(define base-floor (let ((s (getenv "JOLT_CHEZ_ZJ_FLOOR"))) (define base-floor (let ((s (getenv "JOLT_CHEZ_ZJ_FLOOR")))
(if s (string->number s) 2683))) (if s (string->number s) 2684)))
(define floor (if limit 0 base-floor)) (define floor (if limit 0 base-floor))
(when (or (> (length diverged) 0) (< pass floor)) (when (or (> (length diverged) 0) (< pass floor))
(printf "REGRESSION: pass ~a < floor ~a or ~a new divergence(s)\n" (printf "REGRESSION: pass ~a < floor ~a or ~a new divergence(s)\n"