mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
49 lines
641 B
Scheme
49 lines
641 B
Scheme
;; A temporary test file
|
|
;; TODO: create a test suite
|
|
(import (scheme base) (scheme write))
|
|
|
|
(define x (exact (expt 2 29)))
|
|
(write (bignum? x))
|
|
(write (bignum? (+ x x)))
|
|
(write (+ x x))
|
|
(newline)
|
|
(set! x (+ x x))
|
|
(write
|
|
(list x (+ x ) (+ 1 x)))
|
|
(newline)
|
|
(write
|
|
(list
|
|
x
|
|
(+ 1.0 x )
|
|
(+ x x)
|
|
(+ x 1.0)
|
|
(+ x 1)
|
|
))
|
|
(newline)
|
|
(write
|
|
(list
|
|
x
|
|
(- 1.0 x )
|
|
(- x x)
|
|
(- x 1.0)
|
|
(- x 1)
|
|
))
|
|
(newline)
|
|
(write
|
|
(list
|
|
x
|
|
(* 1.0 x )
|
|
(* x x)
|
|
(* x 1.0)
|
|
(* x 1)
|
|
))
|
|
(newline)
|
|
(write
|
|
(list
|
|
x
|
|
(/ 1.0 x )
|
|
(/ x x)
|
|
(/ x 1.0)
|
|
(/ x 1)
|
|
))
|
|
(newline)
|