[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug with large fractions
From: |
Ludovic Courtès |
Subject: |
Re: Bug with large fractions |
Date: |
Tue, 09 Jan 2007 20:54:14 +0100 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) |
Hi,
address@hidden (Ludovic Courtès) writes:
> guile> (define x (* 123123123123123123 100))
> guile> x
> 12312312312312312300
> guile> (set! x (+ x 12))
> guile> x
> 12312312312312312312
> guile> (set! x (/ x 100))
> guile> x
> 3078078078078078078/25 ;; this is wrong!
The fraction here is actually correct, only the result of
`exact->inexact' is rounded.
> guile> (exact->inexact x)
> 123123123123123000.0
Thanks,
Ludovic.