chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] read / write floats


From: Gábor Balázs
Subject: [Chicken-users] read / write floats
Date: Sat, 25 Aug 2007 22:44:54 +0200

Hello,

I tried the following with chicken 2.6:

    (define v1 (/ 1 3))
    (call-with-output-file "try.dat"
                           (lambda (port)
                             (write v1 port)))
                           
    (define v2 (call-with-input-file "try.dat"
                                     (lambda (port)
                                       (read port))))
    (print "v1 = " v1)
    (print "v2 = " v2)
    (print (equal? v1 v2))
   
(print (= v1 v2))
    (print (- v1 v2))

And the result was:

    v1 = 0.333333333333333
    v2 = 0.333333333333333
    #f
    #f
    3.33066907387547e-16

Is it a known bug?
I tried to report this, but I did not find the easy way.

`bg`


reply via email to

[Prev in Thread] Current Thread [Next in Thread]