Re: [PATCH] Allow user-defined meta-commands

2010-10-31 Thread Jose A. Ortega Ruiz
On Mon, Nov 01 2010, Andreas Rottmann wrote: > Besides allowing user-defined meta-commands, this change also refactors > the meta-command machinery to split reading a command's arguments from > the procedure actually implementing it, and hence allows nesting > meta-commands. As an example of such

Re: fix for expt bug

2010-10-31 Thread Ramakrishnan Muthukrishnan
On Mon, Nov 1, 2010 at 5:33 AM, Mark H Weaver wrote: > Ramakrishnan, > > Your fix is incorrect.  You have assumed that (-a)^b = -(a^b), Mark, Yes, you are right. Not sure what I was thinking when I made the patch. :-( > The reported bug is simply due to roundoff error.  You must know > somethin

[PATCH] Allow user-defined meta-commands

2010-10-31 Thread Andreas Rottmann
Besides allowing user-defined meta-commands, this change also refactors the meta-command machinery to split reading a command's arguments from the procedure actually implementing it, and hence allows nesting meta-commands. As an example of such a command, ",in" is added as a new meta-command. *

Re: fix for expt bug

2010-10-31 Thread Mark H Weaver
Ramakrishnan, Your fix is incorrect. You have assumed that (-a)^b = -(a^b), but this is true only if b is an odd integer. A correct relation is (-a)^b = (-1)^b * a^b. As reported by Ludovic: scheme@(guile-user)> (expt -2742638075.5 2) $8 = 7.52206361318235e18-1842.31337891184i scheme@(guile-us

fix for expt bug

2010-10-31 Thread Ramakrishnan Muthukrishnan
Hi, As reported here: expt currently wrongly prints the results for any negative base numbers. The attached patch (also attached with the bug tracker) has a fix and also adds a test case. This is my first patch to guile, so please correct me if I