"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "r4rstest.scm" between
scm-5f2.zip and scm-5f3.zip

About: SCM is a Scheme Language Interpreter.

r4rstest.scm  (scm-5f2):r4rstest.scm  (scm-5f3)
skipping to change at line 787 skipping to change at line 787
(do ((cnt -323 (+ 1 cnt))) (do ((cnt -323 (+ 1 cnt)))
((> cnt 308) success) ((> cnt 308) success)
(let* ((estr (string-append "1.e" (number->string cnt))) (let* ((estr (string-append "1.e" (number->string cnt)))
(num (string->number estr)) (num (string->number estr))
(str (number->string num))) (str (number->string num)))
(cond ((or (>= (string-length str) 10) (cond ((or (>= (string-length str) 10)
(not (equal? (string->number str) num))) (not (equal? (string->number str) num)))
(set! success #f) (set! success #f)
(for-each write (list estr num str (string->number str)))))))) (for-each write (list estr num str (string->number str))))))))
(define (float-powers-of-2-test)
(define all-ok? #t)
(do ((xx (expt f2.0 1000) (/ xx 2))
(p 1000 (+ p -1)))
((zero? xx) all-ok?)
(let ((cnv (string->number (number->string xx))))
(cond ((not (= xx cnv))
(display "Number readback failure for ")
(display `(expt ,f2.0 ,p)) (newline)
(display xx) (newline)
(set! all-ok? #f))))))
(SECTION 6 5 6) (SECTION 6 5 6)
(test #t 'float-print-test (float-print-test f0.0)) (test #t 'float-print-test (float-print-test f0.0))
(test #t 'mult-float-print-test (mult-float-print-test f1.0)) (test #t 'mult-float-print-test (mult-float-print-test f1.0))
(test #t 'mult-float-print-test (mult-float-print-test (test #t 'mult-float-print-test (mult-float-print-test
(string->number "3.0"))) (string->number "3.0")))
(test #t 'mult-float-print-test (mult-float-print-test (test #t 'mult-float-print-test (mult-float-print-test
(string->number "7.0"))) (string->number "7.0")))
(test #t 'mult-float-print-test (mult-float-print-test (test #t 'mult-float-print-test (mult-float-print-test
(string->number "3.1415926535897931"))) (string->number "3.1415926535897931")))
(test #t 'mult-float-print-test (mult-float-print-test (test #t 'mult-float-print-test (mult-float-print-test
(string->number "2.7182818284590451"))) (string->number "2.7182818284590451")))
(test #t float-rw-range-test))) (test #t float-rw-range-test)
(test #t float-powers-of-2-test)))
(define (test-bignum) (define (test-bignum)
(define tb (define tb
(lambda (n1 n2) (lambda (n1 n2)
(= n1 (+ (* n2 (quotient n1 n2)) (= n1 (+ (* n2 (quotient n1 n2))
(remainder n1 n2))))) (remainder n1 n2)))))
(define b3-3 (string->number "33333333333333333333")) (define b3-3 (string->number "33333333333333333333"))
(define b3-2 (string->number "33333333333333333332")) (define b3-2 (string->number "33333333333333333332"))
(define b3-0 (string->number "33333333333333333330")) (define b3-0 (string->number "33333333333333333330"))
(define b1-1 (string->number "11111111111111111111")) (define b1-1 (string->number "11111111111111111111"))
 End of changes. 2 change blocks. 
1 lines changed or deleted 14 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)