chibi-scheme/tests/flonum-tests.scm
Alex Shinn 695b44332e adding interface to bytecode-literals
(need to check these when debugging gc)
2010-12-05 16:53:38 -08:00

21 lines
576 B
Scheme

;;;; these will fail when compiled either without flonums or trig funcs
(import (chibi test))
(test-begin "floating point")
(test-assert (= -5 (floor -4.3)))
(test-assert (= -4 (ceiling -4.3)))
(test-assert (= -4 (truncate -4.3)))
(test-assert (= -4 (round -4.3)))
(test-assert (= 3 (floor 3.5)))
(test-assert (= 4 (ceiling 3.5)))
(test-assert (= 3 (truncate 3.5)))
(test-assert (= 4 (round 3.5)))
(test 1124378190243790143.0 (exact->inexact 1124378190243790143))
;; (test "1124378190243790143.0"
;; (number->string (exact->inexact 1124378190243790143)))
(test-end)