Re: expt with rationals hangs openmcl

Gary Byers <[email protected]> Tue, 23 Jul 2002 00:46:40 -0600 (MDT)
Newsgroups gmane.lisp.openmcl.bugs
Message-ID <[email protected]>
Sorry for taking so long to respond; some mail had gotten stuck in a mail
queue and just got unstuck a little while ago.

The bug actually has to do with how two-argument multiplications are compiled,
and especially how they're compiled inside the body of the function
CCL::*-2, which implements two-argument multiplications.  It's a long
story, but one could get the same infinite loop by doing:

? (ccl::*-2 1 1)

in the listener.

The enclosed patch seems to fix that case (and the very similar case
that happens in your EXPT example.)

Gary Byers
[email protected]

On Mon, 15 Jul 2002, Cliff Crawford wrote:

> Hello,
> I'm using openmcl 0.12.1 on OS X, and I've noticed that whenever I try
> to use expt with a fractional base (for example, (expt 1/2 -2)) openmcl
> just hangs, it never returns a value:
>
> ? (expt 0.5 -2)
> 4.0
> ? (expt 1/2 -2)
> > Break:
> > While executing: #<Anonymous Function #x25938E>
> > Type :GO to continue, :POP to abort.
> > If continued: Return from BREAK.
> [...]
>
>
> --
> Cliff Crawford                   ::                   cjc26 at cornell dot edu
> It goes against the grain of modern education to teach children to program.
> What fun is there in making plans, acquiring discipline in organizing thoughts,
> devoting attention to detail and learning to be self-critical?  -- Alan Perlis
>
> _______________________________________________
> bug-openmcl mailing list
> [email protected]
> http://clozure.com/cgi-bin/mailman/listinfo/bug-openmcl
>
>