From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Elias_M=C3=A5rtenson?= Newsgroups: gmane.emacs.devel Subject: Re: Making 'eq' == 'eql' in bignum branch Date: Fri, 10 Aug 2018 15:05:45 +0800 Message-ID: References: <29f933ac-a6bf-8742-66a7-0a9d6d3e5a88@disroot.org> <49d8ba62-c9a5-9203-d882-8e900b441ff3@cs.ucla.edu> <8e0320d9-e0d0-2b57-57cc-2df4399f133c@cs.ucla.edu> <87lgaio7xd.fsf@tromey.com> <877em1cb0i.fsf@tromey.com> <765767b2-d2e5-a9a6-f724-d58ecf4847bb@cs.ucla.edu> <76081b5d-8c10-0a37-2c97-d4864c0faa80@cs.ucla.edu> <09153aed-361d-4f82-d9ac-b502314769ae@cs.ucla.edu> <83600yt8ih.fsf@gnu.org> <83h8kgpnir.fsf@gnu.org> <7dd71d44-69bc-3adf-576b-8b9e31184a24@cs.ucla.edu> <83d0v4p1si.fsf@gnu.org> <827beb76-3adf-f2f9-33b1-1baee55680cd@cs.ucla.edu> <83wotbo04h.fsf@gnu.org> <77d5f8b0-2277-b28e-8565-d3e00c411795@cs.ucla.edu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000000f263505730f607f" X-Trace: blaine.gmane.org 1533884650 10812 195.159.176.226 (10 Aug 2018 07:04:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 10 Aug 2018 07:04:10 +0000 (UTC) Cc: Eli Zaretskii , Stefan Monnier , emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 10 09:04:06 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fo1Su-0002hY-BG for ged-emacs-devel@m.gmane.org; Fri, 10 Aug 2018 09:04:04 +0200 Original-Received: from localhost ([::1]:54663 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fo1V0-0000bA-RL for ged-emacs-devel@m.gmane.org; Fri, 10 Aug 2018 03:06:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55537) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fo1Uo-0000a4-Hv for emacs-devel@gnu.org; Fri, 10 Aug 2018 03:06:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fo1Un-0001Un-HW for emacs-devel@gnu.org; Fri, 10 Aug 2018 03:06:02 -0400 Original-Received: from mail-it0-x235.google.com ([2607:f8b0:4001:c0b::235]:39328) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fo1Ul-0001T1-MO; Fri, 10 Aug 2018 03:05:59 -0400 Original-Received: by mail-it0-x235.google.com with SMTP id g141-v6so1398009ita.4; Fri, 10 Aug 2018 00:05:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=keU6rcm+v17oQ5R0yYpY/raD9Z07/AYw6IhgfaPwy+4=; b=r608sggnP5cl2NvKcxGKrbHBfnJG4+w2M4TAHO33ywZbo/GP5XhSvJYPeV8txgcAHe TIzB32Yg9Ofk/ekSpK1Nt9ee4CRPQIkbM5cR2W6mhVrY2ZvArZ+ZTnVzxsrpvNEY2yNV 78tMjLGeiqT0Ocrvt827uGbpJ3vbrj+YmlOPHBg48Smyw1LsY3c9+d2sVUIawo6HGca4 PtaSlcWM0kCNo7Iko9nGaoSOx3m1Q/QjRHdlw23JWDE2GzLl0uP26X5oxQWNB7+dP6pI HudgV7f4WrqYcpOwFVZYSL6rQ/wITSpfHbXGEoRUoF8kY6or8c+QsD4tNUGlS4+GWhw2 iPiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=keU6rcm+v17oQ5R0yYpY/raD9Z07/AYw6IhgfaPwy+4=; b=UZciXZ06F8WkodvqkmSiZmyDpqoKEEdaV4WnxYEcq8nVpcl4tTOO/Cv/ldgOQB9CJ6 zPmxtTFwiYkV+CvfEspW0aG5PAvipkY23gqu4seKVT5gVxa3TltVrs/Mf19Jmn0NjaJz 2JTAwzSeOXh/E9BDrp5MLugShZNgKWurMeoVs5x2aLxJbnsq0l4Wjf1a0Sj01S85glxn lJQLRCHfj6ZfrHDWnnA4RWGWNQj0QezBZjq9yXytuPJcz36GNARgcOufs+JSAEVzx5Kj Za5/2PwO5nJO/zzKxSotX7yG2Y2j45C1ez271fdlc7m03+UEo7/RIGxTBpWxUNm2NR63 14/A== X-Gm-Message-State: AOUpUlF9im3aIMBAxkYiwwrHNTQZVSlSUnhptPQdDRrbeC/ByLtpxGXX W0zEUtsmbhk/ymdtK730lcYmtjspxlgD2Tr2QEI= X-Google-Smtp-Source: AA+uWPzmPoBobCiIqspDYBga+mxD91rj9DRAWFwRzh5+Tb2FIxDG6902eh8mElK5xHFgR1/tW8r5t1ZqkbsEG45R+Rg= X-Received: by 2002:a02:9936:: with SMTP id r51-v6mr4669850jaj.46.1533884756860; Fri, 10 Aug 2018 00:05:56 -0700 (PDT) In-Reply-To: <77d5f8b0-2277-b28e-8565-d3e00c411795@cs.ucla.edu> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4001:c0b::235 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:228352 Archived-At: --0000000000000f263505730f607f Content-Type: text/plain; charset="UTF-8" On Wed, 1 Aug 2018, 06:45 Paul Eggert, wrote: > > These should be fine on a 64-bit platform. file-system-info invariably > yields floating-point numbers with the bottom three bits zero, due to > how modern file systems are built (their sizes are multiples of powers > of two). file-attributes returns an exact value unless your file is > larger than 2**61 bytes (2 EiB), and once we get to the rare files > larger than that we should be using bignums anyway. (The same could be > said for file-system-info, of course.) > Sorry for butting in, but in reading this discussion I'm wondering why you don't use the high order bits of the exponent instead of the low order bits of the mantissa? Sure, you'd need some bit fiddling (rotation and masking) to make it into a proper floating point number, but now you'll find yourself in a situation where almost 100% of floating point numbers will fit in a word with tags. Regards, Elias > --0000000000000f263505730f607f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, = 1 Aug 2018, 06:45 Paul Eggert, <eg= gert@cs.ucla.edu> wrote:
These should be fine on a 64-bit platform. file-system-info invariably
yields floating-point numbers with the bottom three bits zero, due to
how modern file systems are built (their sizes are multiples of powers
of two). file-attributes returns an exact value unless your file is
larger than 2**61 bytes (2 EiB), and once we get to the rare files
larger than that we should be using bignums anyway. (The same could be
said for file-system-info, of course.)

Sorry for butting in, but in reading = this discussion I'm wondering why you don't use the high order bits= of the exponent instead of the low order bits of the mantissa?

Sure, you'd need some bit fiddl= ing (rotation and masking) to make it into a proper floating point number, = but now you'll find yourself in a situation where almost 100% of floati= ng point numbers will fit in a word with tags.=C2=A0

Regards,=C2=A0
Elias=C2= =A0
--0000000000000f263505730f607f--