guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fix for expt bug


From: Ludovic Courtès
Subject: Re: fix for expt bug
Date: Wed, 03 Nov 2010 00:00:53 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

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 <address@hidden> 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’.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]