Welcome to Racket v5.3.
-> (+ 1/2 1/3)
5/6
BTW, what do the following message mean ?
(use numbers)
; loading /usr/local/lib/chicken/6/numbers.import.so ...
Note: re-importing already imported identifier: +
Note: re-importing already imported identifier: -
Note: re-importing already imported identifier: *
Note: re-importing already imported identifier: /
......
Best Regards!
在 Thu, 08 Nov 2012 00:17:23 -0000,.alyn.post.
<[email protected]> 写道:
On Wed, Nov 07, 2012 at 11:57:33PM -0000, z_axis wrote:
>(+ (+ 1/2 1/3)
Warning: cannot represent exact fraction - coerced to flonum: "1/2"
Warning: cannot represent exact fraction - coerced to flonum: "1/3"
0.8333333333333331/2 1/3)
In racket, it is 5/6. And as i know it is 5/6 for any lisp
implementation.
Sincerely!
I suspect in Racket your above code is a syntax error. ;-)
More seriously, try this:
(use numbers)
(+ (+ 1/2 1/3))
That gives you the answer you expect.
-Alan
_______________________________________________
Chicken-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/chicken-users