On Tue, Nov 2, 2010 at 10:25 AM, Mark H Weaver <m...@netris.org> 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