From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.help Subject: Re: Calculator: no exponent, full number ? Date: Thu, 6 Jun 2019 19:04:59 +0200 Message-ID: <20190606170459.GA19929@tuxteam.de> References: <20190604154307.565d33cf@mistral> <87zhmwzn67.fsf@mbork.pl> <20190605095317.499f2082@mistral> <86tvd3sig6.fsf@zoho.eu> <875zpibtr3.fsf@mbork.pl> <86wohyodxs.fsf@zoho.eu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="2fHTh5uZTiUOsy+g" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="178723"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.5.21 (2010-09-15) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 06 19:05:38 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hYvpZ-000kLe-Nr for geh-help-gnu-emacs@m.gmane.org; Thu, 06 Jun 2019 19:05:38 +0200 Original-Received: from localhost ([127.0.0.1]:35417 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hYvpX-0005Hb-Ph for geh-help-gnu-emacs@m.gmane.org; Thu, 06 Jun 2019 13:05:35 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:35040) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hYvpH-0005GC-R0 for help-gnu-emacs@gnu.org; Thu, 06 Jun 2019 13:05:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hYvpE-0000xY-Mv for help-gnu-emacs@gnu.org; Thu, 06 Jun 2019 13:05:19 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]:59555) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hYvp2-0000GG-G2 for help-gnu-emacs@gnu.org; Thu, 06 Jun 2019 13:05:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=From:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:To:Date; bh=ZV9OL/CsVjxzjgjR2RO/HYkbcmhNVoWPBtWmh82vaZY=; b=eSwq+pxzYXS/cv1cbkKadzCKugCNGVIYFKZ+M52vYpTb3bZRpPcxopfl5//r2R03s6g6wG8Q13DSxI7/wRZJ6jCA0wxy7pJF5jr7DP/4cK+wW+ZJmsksL0TG58gVzTgAfHMtwYo1oh/037hor6uAq/1HMiejtulC6ZmA5X+9iavrtskl0kRfO54R2EdNmXN3hTcPwUUNwMZ/E12t7/KrZ2cnuRKONpmN5KG/zEjt2g6KWTpUpiKkEfShFOnTtxGCYiM/Y72hOEOrtWlTEH3eSop1ZgXEiKQ8utp7VJvI8cGB+oHNtLBE8oOdy+r/LzfCnf6S1w/pIk7Xq6UMTyYZCQ==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1hYvox-0005gQ-6U for help-gnu-emacs@gnu.org; Thu, 06 Jun 2019 19:04:59 +0200 Content-Disposition: inline In-Reply-To: <86wohyodxs.fsf@zoho.eu> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 5.199.139.25 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:120780 Archived-At: --2fHTh5uZTiUOsy+g Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jun 06, 2019 at 06:50:55PM +0200, Emanuel Berg via help-gnu-emacs w= rote: > Marcin Borkowski wrote: >=20 > >> (defun hypotenuse (c1 c2) > >> (sqrt (+ (* c1 c1) (* c2 c2))) ) > > > > Just for the fun, let me mention that this is > > not a very good algorithm for computing the > > Pythagorean sum - it may happen that both the > > operands and the result lie within the bounds > > for the given type but this calculation blows > > up because of large squares overflowing. >=20 > Well, first let it be known that Marcin is > a professional mathematician, famous for his > remarkable calculations. That said, the above > comment is on the computer side of things, > right? In the math world, what would happen is > just a very large triangle, again - right? >=20 > Assuming integers, how large can they be in > Emacs Lisp? Eval us: >=20 > most-positive-fixnum ; 536870911 > "Typical values are 2**29 =E2=88=92 1 on 32-bit and > 2**61 =E2=88=92 1 on 64-bit platforms." [1] [...] Newer Emacsen support bignums: (expt 71 71) =3D> 275006373483461607657434076627252658495183350017755660813= 753981774508905998081919405140568848353397233796618192645698819765129996471 That said, calc itself supports bignums since long. Cheers -- t --2fHTh5uZTiUOsy+g Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlz5R7sACgkQBcgs9XrR2kYBqACePlT7gyOh3EEvgiTYrNzqZehV 2ugAn1Rm6qmUYKHrratIOqY2XDcfGRnH =r9a8 -----END PGP SIGNATURE----- --2fHTh5uZTiUOsy+g--