diff --git a/collects/tests/mzscheme/benchmarks/shootout/nbody-vec-unsafe.ss b/collects/tests/mzscheme/benchmarks/shootout/nbody-vec-unsafe.ss index df8e97afa3..fac48a2690 100644 --- a/collects/tests/mzscheme/benchmarks/shootout/nbody-vec-unsafe.ss +++ b/collects/tests/mzscheme/benchmarks/shootout/nbody-vec-unsafe.ss @@ -28,16 +28,12 @@ Correct output N = 1000 is ;; ------------------------------ ;; define planetary masses, initial positions & velocity -(define-syntax-rule (defconst id n) - (define-syntax (id stx) (quote-syntax n))) +(define +pi+ 3.141592653589793) ;; define locally to enable inlining +(define +days-per-year+ 365.24) -(defconst +pi+ 3.141592653589793) -(defconst +days-per-year+ 365.24) +(define +solar-mass+ (* 4 +pi+ +pi+)) -;; +solar-mass+ = (* 4 +pi+ +pi+) -(defconst +solar-mass+ 39.47841760435743) - -(defconst +dt+ 0.01) +(define +dt+ 0.01) (define make-body flvector) (define-syntax-rule (deffield n getter setter) @@ -91,7 +87,7 @@ Correct output N = 1000 is (fl* 5.15138902046611451e-05 +solar-mass+))) (define *system* (vector *sun* *jupiter* *saturn* *uranus* *neptune*)) -(defconst *system-size* 5) +(define *system-size* 5) ;; ------------------------------- (define (offset-momentum) (let loop-i ([i 0] [px 0.0] [py 0.0] [pz 0.0]) diff --git a/collects/tests/mzscheme/benchmarks/shootout/spectralnorm-unsafe.ss b/collects/tests/mzscheme/benchmarks/shootout/spectralnorm-unsafe.ss index 77bebee048..6e558fdeea 100644 --- a/collects/tests/mzscheme/benchmarks/shootout/spectralnorm-unsafe.ss +++ b/collects/tests/mzscheme/benchmarks/shootout/spectralnorm-unsafe.ss @@ -20,7 +20,7 @@ ;; v.Bv /(v.v) eigenvalue of v (let loop ([i 0][vBv 0.0][vv 0.0]) (if (= i n) - (sqrt (unsafe-fl/ vBv vv)) + (unsafe-flsqrt (unsafe-fl/ vBv vv)) (let ([vi (unsafe-flvector-ref v i)]) (loop (unsafe-fx+ 1 i) (unsafe-fl+ vBv (unsafe-fl* (unsafe-flvector-ref u i) vi))