From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: expt weirdness in floatfns.c Date: Sat, 6 Aug 2005 18:43:08 -0500 (CDT) Message-ID: <200508062343.j76Nh8u17215@raven.dms.auburn.edu> References: <87ek98at3c.fsf@gnufans.net> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1123372734 2532 80.91.229.2 (6 Aug 2005 23:58:54 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 6 Aug 2005 23:58:54 +0000 (UTC) Cc: deego@gnufans.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Aug 07 01:58:42 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1E1YY5-0004Je-BA for ged-emacs-devel@m.gmane.org; Sun, 07 Aug 2005 01:57:53 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E1YZJ-0006cr-DE for ged-emacs-devel@m.gmane.org; Sat, 06 Aug 2005 19:59:09 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1E1YYu-0006XD-Qe for emacs-devel@gnu.org; Sat, 06 Aug 2005 19:58:45 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1E1YYl-0006QD-6f for emacs-devel@gnu.org; Sat, 06 Aug 2005 19:58:35 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E1YYl-0006Ng-3D for emacs-devel@gnu.org; Sat, 06 Aug 2005 19:58:35 -0400 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1E1YXV-0006gS-7r; Sat, 06 Aug 2005 19:57:17 -0400 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.12.10/8.12.10) with ESMTP id j76NhNqt020246; Sat, 6 Aug 2005 18:43:23 -0500 (CDT) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id j76Nh8u17215; Sat, 6 Aug 2005 18:43:08 -0500 (CDT) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: rms@gnu.org In-reply-to: (rms@gnu.org) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:41635 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:41635 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.