[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: expt weirdness in floatfns.c
From: |
Thien-Thi Nguyen |
Subject: |
Re: expt weirdness in floatfns.c |
Date: |
06 Aug 2005 18:36:03 -0400 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
"Richard M. Stallman" <address@hidden> writes:
> The comment suggests this was for compatibility with Common Lisp.
> We may as well not change it.
i changed `Fexpt' so that:
(expt 2 -2) => 0.25
i'm inclined to leave the change in for (more) mathematical correctness,
and also because w/ the change, the behavior concords w/ the elisp info
page which says:
@defun expt x y
This function returns @var{x} raised to power @var{y}. If both
arguments are integers and @var{y} is positive, the result is an
integer; in this case, overflow causes truncation, so watch out.
@end defun
if someone complains, we can always revert it (and update the docs to
mention the (IMHO) strange behavior).
thi
Re: expt weirdness in floatfns.c, Luc Teirlinck, 2005/08/06