[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fix for expt bug
From: |
Ramakrishnan Muthukrishnan |
Subject: |
Re: fix for expt bug |
Date: |
Tue, 2 Nov 2010 10:52:56 +0530 |
On Tue, Nov 2, 2010 at 10:25 AM, Mark H Weaver <address@hidden> wrote:
> Hi Ramakrishnan,
>
> Thanks for the revised patch. There are still some problems:
> [...]
>
> This is an improvement, but isn't quite right. scm_integer_expt
> requires that y be an exact integer, but x is allowed to be any scheme
> number whatsoever. So the "scm_exact_p (x)" doesn't belong. It should
> simply be changed to "scm_exact_p (y)" instead.
>
> The other problem is that !SCM_FRACTIONP is not the right test.
> Although it is currently true that the only exact numbers in guile are
> integers and rationals, there's no guarantee that other exact numbers
> won't be added in the future.
>
> The test above should be this:
>
> if (scm_is_true (scm_exact_p (y)) && scm_is_integer (y))
Thanks Mark, for the comments. I am learning a lot. I will make the
changes and test them.
--
Ramakrishnan
- Re: fix for expt bug, Ramakrishnan Muthukrishnan, 2010/11/01
- Re: fix for expt bug, Ramakrishnan Muthukrishnan, 2010/11/01
- Re: fix for expt bug, Mark H Weaver, 2010/11/02
- Re: fix for expt bug,
Ramakrishnan Muthukrishnan <=
- Re: fix for expt bug, Ramakrishnan Muthukrishnan, 2010/11/02
- Re: fix for expt bug, Mark H Weaver, 2010/11/02
- Re: fix for expt bug, Ludovic Courtès, 2010/11/02
- Re: fix for expt bug, Mark H Weaver, 2010/11/02
- Re: fix for expt bug, Ramakrishnan Muthukrishnan, 2010/11/03
- Re: fix for expt bug, Mark H Weaver, 2010/11/03
- Re: fix for expt bug, Ramakrishnan Muthukrishnan, 2010/11/03
- Re: fix for expt bug, Mark H Weaver, 2010/11/03
- Re: fix for expt bug, Ramakrishnan Muthukrishnan, 2010/11/03
- Re: fix for expt bug, Ramakrishnan Muthukrishnan, 2010/11/03