Richard Stallman wrote:
The comment suggests this was for compatibility with Common Lisp.
We may as well not change it.
I do not see how Emacs can be compatible with Common Lisp in this
respect, since it does not implement rational numbers. From the CL Hyperspec:
expt returns base-number raised to the power power-number. If the
base-number is a rational and power-number is an integer, the
calculation is exact and the result will be of type rational;
otherwise a floating-point approximation might result.
>From the Common Lisp implementation CLISP:
[1]> (expt 2 -2)
1/4
which is consistent with the above quote.
To be compatible with CL, Emacs should return 1/4, which it can not
do, having no rational numbers. 0.25, even though inexact, would
appear to be more "compatible" with 1/4 than 0.
Sincerely,
Luc.
_______________________________________________
Emacs-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-devel