From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Code for converting between Elisp and Calc floats Date: Sun, 25 Oct 2009 06:36:19 +0100 Organization: Organization?!? Message-ID: <87hbto11d8.fsf@lola.goethe.zz> References: <200910082047.n98KlkAB020482@godzilla.ics.uci.edu> <87aazj2r7d.fsf_-_@vh213601.truman.edu> <87ws2kmuez.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1256449037 24064 80.91.229.12 (25 Oct 2009 05:37:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 25 Oct 2009 05:37:17 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 25 06:37:09 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1N1vmu-0008Jl-NW for ged-emacs-devel@m.gmane.org; Sun, 25 Oct 2009 06:37:09 +0100 Original-Received: from localhost ([127.0.0.1]:46061 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N1vmu-0005Jc-0M for ged-emacs-devel@m.gmane.org; Sun, 25 Oct 2009 01:37:08 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N1vmk-0005JP-C3 for emacs-devel@gnu.org; Sun, 25 Oct 2009 01:36:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N1vmf-0005Fq-6n for emacs-devel@gnu.org; Sun, 25 Oct 2009 01:36:57 -0400 Original-Received: from [199.232.76.173] (port=57141 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N1vmf-0005Fh-0w for emacs-devel@gnu.org; Sun, 25 Oct 2009 01:36:53 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:51651) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N1vme-0008GC-JM for emacs-devel@gnu.org; Sun, 25 Oct 2009 01:36:52 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.50) id 1N1vmb-0008Hb-ER for emacs-devel@gnu.org; Sun, 25 Oct 2009 06:36:49 +0100 Original-Received: from p5b2c2624.dip.t-dialin.net ([91.44.38.36]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 25 Oct 2009 06:36:49 +0100 Original-Received: from dak by p5b2c2624.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 25 Oct 2009 06:36:49 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 37 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: p5b2c2624.dip.t-dialin.net X-Face: 2FEFf>]>q>2iw=B6, xrUubRI>pR&Ml9=ao@P@i)L:\urd*t9M~y1^:+Y]'C0~{mAl`oQuAl \!3KEIp?*w`|bL5qr,H)LFO6Q=qx~iH4DN; i"; /yuIsqbLLCh/!U#X[S~(5eZ41to5f%E@'ELIi$t^ Vc\LWP@J5p^rst0+('>Er0=^1{]M9!p?&:\z]|;&=NP3AhB!B_bi^]Pfkw User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) Cancel-Lock: sha1:N1eK3uQG8CS/tFYRSkeBvLgrbmo= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:116384 Archived-At: Stefan Monnier writes: >>> As for the feature itself, I'm not sure whether I like it. >>> Could someone explain exactly what's the rationale behind this >>> (e.g. a typical use case), what alternatives were considered, etc...? >> Vincent explained this to me, but I expect he'll come along and do a >> better job explaining than I can. > > Is he reading this thread? > >>> E.g. an "obvious" alternative would be to add builtin "big floats" via >>> libgmp or some such. >> Using libgmp in Emacs has been discussed in the past, but as I recall >> hasn't had much support. > > It hasn't had much support indeed, mostly for lack of interest > in bignums. But if we decide bignums deserve some C code, then maybe > libgmp would be a good idea. Then again, without knowing the whys and > hows, it's hard to tell. There are few areas of importance. One would be buffer_size. Putting them transparently in there would imply having them all over the place in overlay positions, point and so on. I am also not sure that bignums of equal value compare as eq (floats don't) and there is likely code around relying on it. The buffer size problem would likely be less radically addressed by adding another bit of tagging, and then use half of the possible values for integers, giving a range of -2^30 .. 2^30-1. That's what XEmacs does, and it goes a far way of extending the point of nuisance. Of course calc could profit if one ripped out all of its multiple-precision list-based code (does not even use floats). But that would not require a transparent bignum type. An on-demand type would suffice. -- David Kastrup