From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Bruno =?utf-8?Q?F=C3=A9lix?= Rezende Ribeiro Newsgroups: gmane.emacs.help Subject: Re: (- 2.8 1.6) ; 1.1999999999999997 Date: Tue, 07 Apr 2020 11:00:41 -0300 Message-ID: <87ftdfwg3a.fsf@oitofelix.com> References: <8736biywcn.fsf@ebih.ebihd> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="64099"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: Stefan Monnier Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 07 16:01:18 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jLomz-000GUL-CH for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 07 Apr 2020 16:01:17 +0200 Original-Received: from localhost ([::1]:47786 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLomy-0004Yb-Eu for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 07 Apr 2020 10:01:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49929) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLomX-0004X9-FN for help-gnu-emacs@gnu.org; Tue, 07 Apr 2020 10:00:53 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:57338) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jLomW-0003pm-O8; Tue, 07 Apr 2020 10:00:49 -0400 Original-Received: from [189.15.96.129] (port=58356 helo=felix-laptop) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1jLomU-0005Ls-Au; Tue, 07 Apr 2020 10:00:47 -0400 In-Reply-To: (Stefan Monnier's message of "Mon, 10 Feb 2020 20:31:56 -0500") X-Face: %,T7Hsg=SK$Zh)wiU4Qdv9-fZ26Pf5*+}Ld,{LeV'Cq-1?=kA"hc,'i""S85]g; _W+{nZfx 2GnAMS1K\E_E&:{h[wQd+Tqj5#PtH:W&8^crA0>i?nmD7hOL$K".`@An_8.7gaObQLlMy0\%%I0Jp. Lue$J0B Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACcElEQVRYw93YzXHCQAwF4G0h Fw4caYEW0oJbSAtuwa1AldGg8PKQtP+GMHkHxkDG/qLVrtek6x65UCZPleYdH485HA4zrHHQ4R5F cPSTl4L0qigJDoxpoFRpUmMGKzR1sbpB3DTLsnzd83nL+XyeNHWDoBHEeg9YQlQWCtZrSmOa1YVN ktDkiz0FwmDJVbd7CizTUhcXLByDINXIiGyUQqnkL8Nm8iCY5CD1lkf+9UYQFykEhb7UqEGFeLwK Q6YgnXTovEtDZkHGZFpbR21nkLlhlUFqWig63XYGyevxeGSQXFjXG4lclSnyyekW/Ur+jFfzWRD6 31RoeQxAnxQB6cErQBKsywDpW6Yo93UgFAMg3DqgMaCqaRzEc4pBPh50fdxk9oF4zvPCCBDml6fo sIagnClVNTmQn/BAmOXxn4LMXQan45vrJCg07QPC/JI8BeT3BjidLNkGpOu1anSNbgd5U6qWx4Ak DOL1RotkTLMV8ouEWYc8yNzezcBNVchv5MIK8VKEHjKrM0D+malvyFoqxG2kLBHIMCmo3EAjFfLl MSAeNSzZoeZZIH/SHAim3I1MMwvC7syAeBuEyV++s3aA2suDHkI7nyi6UUTCHwLGKxSCsFjzzpV3 ZNUihc+s9QqF7YwtEW88zAMQt5Ec7AkKx4uvWjChwaujFoAay+PLUHhQ5LQXKeVu7y2a0GRY/LZq +gG1jBROap4Sy0XyX1VNyf8Ekav8lom5dqFyocn0k62QOenWkBC05uNNDyCv2fpj2mUtxve7vGZB 21CqI1X1BaBhTfiz1QDL9tAMaN70C8L8ei/Q32rYlN6hgdj0DS+u5+J4AqFYAAAAAElFTkSuQmCC X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:122759 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello Stefan, Stefan Monnier writes: > Emacs Lisp, like most common programming language doesn't support > rational numbers (and even less real numbers, which can't be faithfully > represented in a computer) but only floating point numbers. I find this characterization a little bit misleading, and I know it=E2=80= =99s common jargon in computer science backed up by the specialized literature and such, but I=E2=80=99d like to express my view on the matter. Rigorously speaking there is no such thing as floating pointing /numbers/ as there is no such thing as roman /numbers/ or even Arabic decimal /numbers/. All of those are /numerals/, that is, sequence of symbols which represent (true) /numbers/. All floating point numerals demonstrably represent rational numbers, which are by definition also real numbers. Therefore, Emacs support arithmetic on some (finitely many) rational and real numbers. Not all rational numbers can be represented by floating point numerals, though. Yet, all rational numbers can be represented by pairs of arbitrarily large integers, which Emacs support (theoretically) by means of its built-in Calc library. Regarding irrational numbers, computers can faithfully represent any one that is computable. There are infinitely many of those (countably many, still). For instance, they may be represented by procedures that take an arbitrarily large natural number =3Dn=3D and outputs a rational number that differs from the irrational number they represent in less than =3D10^-n=3D units. Being Lisp a Turing-complete language, Emacs can represent all such real numbers. To write an Emacs generalized real number arithmetic package remains as an (exciting?) open exercise for the free software community. In my view and experience the rigor and distinctions I tried to convey above make all the difference in truly understanding the Math-computer and number-numeral dichotomy that seems to confuse so many programmers. > IIUC those calculators used a decimal floating point representation, > which suffers from the same kinds of problems of course, but works > better in this specific case. Trivially, "decimal" floating point numerals (of sorts) would still be a super-set of binary floating point numerals if independent integer exponents were allowed for the denominator factors of 2 and 5. =2D-=20 Bruno F=C3=A9lix Rezende Ribeiro (oitofelix) [0x28D618AF] --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBCAAGBQJejIeJAAoJECe5xv0o1hiv8QUH/1/CrTXUiubtdBRRL5yTafMJ L7/gykXFXtmZysFPVO0pc3eUoavjF4SQ1OkxdBzGecWbZgkQD5j4XWbJtQ5XMg7E iPMEI0saAxPgLCv+b6+KmzL0R2Qy1tNIqNgEebzPaTTjtde6F5CfT/fDtIBN19lO C4ouq0keg1S768KE6xbbX9xhObxJEFNhfybdwUaQxa+hk5g186YhBuQXRUBTSAok LsdwC6r3Qp0CJnOBrx7nGw0o+16jvxD+u7nF4Hab9v5zhahp1y0yHU3NBZjWbOVY o9nEQ0mwvcHERZDnnwjm9Ys0E04X+LqejA5SdYY1vY0YGsX3y/ep5xweESUL2rM= =+mlo -----END PGP SIGNATURE----- --=-=-=--