Fixed bugs in the tests.
This commit is contained in:
parent
566aeedb59
commit
b0788372ea
|
@ -1,8 +1,8 @@
|
|||
#lang typed/scheme #:optimize
|
||||
(require racket/unsafe/ops)
|
||||
(if (number? 3)
|
||||
(display (if (number? 3)
|
||||
(+ 2.0 3.0)
|
||||
(+ 4.0 5.0))
|
||||
(if #t
|
||||
(+ 4.0 5.0)))
|
||||
(display (if #t
|
||||
(+ 2.0 3.0)
|
||||
(+ 4.0 5.0))
|
||||
(+ 4.0 5.0)))
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#lang typed/scheme #:optimize
|
||||
(require racket/unsafe/ops)
|
||||
(if (number? "eh")
|
||||
(display (if (number? "eh")
|
||||
(+ 2.0 3.0)
|
||||
(+ 4.0 5.0))
|
||||
(if #f
|
||||
(+ 4.0 5.0)))
|
||||
(display (if #f
|
||||
(+ 2.0 3.0)
|
||||
(+ 4.0 5.0))
|
||||
(+ 4.0 5.0)))
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
#lang typed/scheme #:optimize
|
||||
(require racket/unsafe/ops)
|
||||
(map (lambda: ((x : Inexact-Complex))
|
||||
(string-append (real->decimal-string (real-part x) 10)
|
||||
(real->decimal-string (imag-part x) 10)))
|
||||
(list
|
||||
(/ 1.0 2.0+4.0i)
|
||||
(/ 1.0+2.0i 2.0)
|
||||
(/ 1.0 2.0+4.0i 3.0+6.0i)
|
||||
(/ 1.0+2.0i 2.0 3.0+6.0i)
|
||||
(/ 1.0+2.0i 2.0+4.0i 3.0)
|
||||
(/ 1.0+2.0i 2.0+4.0i 3.0)))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#lang typed/scheme #:optimize
|
||||
(require racket/unsafe/ops)
|
||||
(begin (number? 3)
|
||||
(unsafe-fl+ 2.0 3.0))
|
||||
(begin #t
|
||||
(unsafe-fl+ 2.0 3.0))
|
||||
(display (begin (number? 3)
|
||||
(unsafe-fl+ 2.0 3.0)))
|
||||
(display (begin #t
|
||||
(unsafe-fl+ 2.0 3.0)))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#lang typed/scheme #:optimize
|
||||
(require racket/unsafe/ops)
|
||||
(begin (number? "eh")
|
||||
(unsafe-fl+ 4.0 5.0))
|
||||
(begin #f
|
||||
(unsafe-fl+ 4.0 5.0))
|
||||
(display (begin (number? "eh")
|
||||
(unsafe-fl+ 4.0 5.0)))
|
||||
(display (begin #f
|
||||
(unsafe-fl+ 4.0 5.0)))
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
#lang typed/scheme #:optimize
|
||||
(require racket/unsafe/ops)
|
||||
(map (lambda: ((x : Inexact-Complex))
|
||||
(string-append (real->decimal-string (real-part x) 10)
|
||||
(real->decimal-string (imag-part x) 10)))
|
||||
(list
|
||||
(let* ((unboxed-gensym-1 1.0)
|
||||
(unboxed-gensym-2 2.0+4.0i)
|
||||
(unboxed-gensym-3 (unsafe-flreal-part unboxed-gensym-2))
|
||||
|
@ -17,6 +21,7 @@
|
|||
unboxed-gensym-4))
|
||||
unboxed-gensym-7)))
|
||||
(unsafe-make-flrectangular unboxed-gensym-5 unboxed-gensym-6))
|
||||
|
||||
(let* ((unboxed-gensym-1 1.0+2.0i)
|
||||
(unboxed-gensym-2 (unsafe-flreal-part unboxed-gensym-1))
|
||||
(unboxed-gensym-3 (unsafe-flimag-part unboxed-gensym-1))
|
||||
|
@ -33,6 +38,7 @@
|
|||
(unsafe-fl* unboxed-gensym-2 0.0))
|
||||
unboxed-gensym-7)))
|
||||
(unsafe-make-flrectangular unboxed-gensym-5 unboxed-gensym-6))
|
||||
|
||||
(let* ((unboxed-gensym-1 1.0)
|
||||
(unboxed-gensym-2 2.0+4.0i)
|
||||
(unboxed-gensym-3 (unsafe-flreal-part unboxed-gensym-2))
|
||||
|
@ -67,6 +73,7 @@
|
|||
unboxed-gensym-7))
|
||||
unboxed-gensym-11)))
|
||||
(unsafe-make-flrectangular unboxed-gensym-8 unboxed-gensym-9))
|
||||
|
||||
(let* ((unboxed-gensym-1 1.0+2.0i)
|
||||
(unboxed-gensym-2 (unsafe-flreal-part unboxed-gensym-1))
|
||||
(unboxed-gensym-3 (unsafe-flimag-part unboxed-gensym-1))
|
||||
|
@ -100,6 +107,7 @@
|
|||
unboxed-gensym-7))
|
||||
unboxed-gensym-11)))
|
||||
(unsafe-make-flrectangular unboxed-gensym-8 unboxed-gensym-9))
|
||||
|
||||
(let* ((unboxed-gensym-1 1.0+2.0i)
|
||||
(unboxed-gensym-2 (unsafe-flreal-part unboxed-gensym-1))
|
||||
(unboxed-gensym-3 (unsafe-flimag-part unboxed-gensym-1))
|
||||
|
@ -132,4 +140,4 @@
|
|||
unboxed-gensym-7)
|
||||
(unsafe-fl* unboxed-gensym-12 0.0))
|
||||
unboxed-gensym-11)))
|
||||
(unsafe-make-flrectangular unboxed-gensym-8 unboxed-gensym-9))
|
||||
(unsafe-make-flrectangular unboxed-gensym-8 unboxed-gensym-9))))
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#lang typed/scheme
|
||||
(require racket/unsafe/ops)
|
||||
(if (number? 3)
|
||||
(display (if (number? 3)
|
||||
(+ 2.0 3.0)
|
||||
(+ 4.0 5.0))
|
||||
(if #t
|
||||
(+ 4.0 5.0)))
|
||||
(display (if #t
|
||||
(+ 2.0 3.0)
|
||||
(+ 4.0 5.0))
|
||||
(+ 4.0 5.0)))
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#lang typed/scheme
|
||||
(require racket/unsafe/ops)
|
||||
(if (number? "eh")
|
||||
(display (if (number? "eh")
|
||||
(+ 2.0 3.0)
|
||||
(+ 4.0 5.0))
|
||||
(if #f
|
||||
(+ 4.0 5.0)))
|
||||
(display (if #f
|
||||
(+ 2.0 3.0)
|
||||
(+ 4.0 5.0))
|
||||
(+ 4.0 5.0)))
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
#lang typed/scheme
|
||||
(require racket/unsafe/ops)
|
||||
(map (lambda: ((x : Inexact-Complex))
|
||||
(string-append (real->decimal-string (real-part x) 10)
|
||||
(real->decimal-string (imag-part x) 10)))
|
||||
(list
|
||||
(/ 1.0 2.0+4.0i)
|
||||
(/ 1.0+2.0i 2.0)
|
||||
(/ 1.0 2.0+4.0i 3.0+6.0i)
|
||||
(/ 1.0+2.0i 2.0 3.0+6.0i)
|
||||
(/ 1.0+2.0i 2.0+4.0i 3.0)
|
||||
(/ 1.0+2.0i 2.0+4.0i 3.0)))
|
||||
|
|
Loading…
Reference in New Issue
Block a user