Hello! Thank you Ramakrishnan for the patch, and thanks Mark for the detailed review! It looks like we’re getting close. :-)
In addition to Mark’s latest comments, just a few cosmetic notes: Ramakrishnan Muthukrishnan <[email protected]> writes: > * libguile/numbers.c: If base is negative, expt needs to find > -x^n = (-1^n) * (|x|^n). We find x^n and then if n is odd, we > also multiply the result with -1. These changes apply only for > cases where n is an integer. Please follow GNU change log conventions, i.e., describe the changes, not the rationale (info "(standards) Change Logs"). Provide appropriate explanations in ‘scm_expt’, though. > * test-suite/tests/numbers.test: Two new test cases for expt. For > cases where the base is negative and the power to be raised is > not an integer, the result should be a complex number. Ditto: list the new test case names. > + (pass-if "(eqv-loosely? -2742638075.5 (expt -2742638075.5 1))" > + (eqv-loosely? -2742638075.5 (expt -2742638075.5 1))) The first argument to ‘pass-if’ can be omitted altogether. Thanks, Ludo’.
