Re: Float printing bug still around?

Gary Byers <[email protected]> Thu, 26 Jun 2003 09:09:11 -0600 (MDT)
Newsgroups gmane.lisp.openmcl.bugs
Message-ID <[email protected]>
This seems to now be fixed in CVS.  If you're not used to building
OpenMCL from source, let me know and I'll try to get a patch to you
some other way.

On Tue, 24 Jun 2003, Paul Wallich wrote:

> Or have I found something else?
>
> I'm running 0.13.6 under OS X, and the following stupid code gives
> screwy printouts (but proper underlying numbers) for anything more than
> about 15 iterations when using integer values for all the inputs:
>
> (defun loanlength (amount interest payment)
>    (let ((monthly-int (/ interest 1200)))
> (do ((currentmonth 0 (1+ currentmonth))
>       (balance amount (- balance (- payment (* balance monthly-int)))))
>      ((< balance 0) currentmonth)
>    (format t "~&Month ~D Balance ~,2F Equity Change ~,2F" currentmonth
>            balance)
> 	  (- payment (* balance monthly-int))))))
>
> The rational representing the balance for a typical example is something
> like
>
> 29479420866365225234014731893929685749/6058287395472553279488000000000000
>
> when things go bad.
>
> For the moment, "don't use integer arguments" seems like a perfectly
> fine fix, but I was under the impression from reading the archive that
> that bug had been stomped. Hence the question
>
> thanks
>
> paul
>
>
>
>
> _______________________________________________
> bug-openmcl mailing list
> [email protected]
> http://clozure.com/cgi-bin/mailman/listinfo/bug-openmcl
>
>