From: Helmut Eller <eller.helmut@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: integer overflow handling for most-negative-fixnum
Date: Sat, 21 Jul 2018 22:10:39 +0200 [thread overview]
Message-ID: <m27elol58g.fsf@gmail.com> (raw)
In-Reply-To: f63cee6a-7829-74d1-c0b5-a6cc9b61ecdc@cs.ucla.edu
On Sat, Jul 21 2018, Paul Eggert wrote:
> How about this idea. First, we extend 'format' to support bitwidth
> modifiers for twos-complement representation. For example, (format
> "%/24x" -1) would format just the low-order 24 bits of the integer,
> and would return "ffffff" regardless of machine word size or whether
> bignums are used.
That sounds reasonable.
> Second, we change (format "%x" -1) to return "-1" rather than a
> machine-dependent string like "3fffffffffffffff" as it does now. That
> would make Elisp be more machine-independent, would solve Andy's
> problem, and would solve other problems once we have bignums, and in
> hindsight it's what we should have done originally.
Can't you simply use some other character for this, like %z (or %ℤ) and
leave %x alone. BTW, %i also seems to be a valid format specifier but
where is it documented?
> However, it would
> be an incompatible change, so let's have the behavior depend on a
> compatibility variable, much as we already do for
> read-integer-overflow-as-float.
This sounds more like that other desaster: text-quoting-style.
Helmut
next prev parent reply other threads:[~2018-07-21 20:10 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-19 2:39 integer overflow handling for most-negative-fixnum Andy Moreton
2018-07-20 22:10 ` Paul Eggert
2018-07-21 5:22 ` Helmut Eller
2018-07-21 9:47 ` Andy Moreton
2018-07-21 10:14 ` Eli Zaretskii
2018-07-21 13:06 ` Andy Moreton
2018-07-21 17:15 ` Stefan Monnier
2018-07-21 17:48 ` Paul Eggert
2018-07-21 18:12 ` Stefan Monnier
2018-07-23 19:18 ` Paul Eggert
2018-07-23 19:57 ` Stefan Monnier
2018-07-23 23:09 ` Paul Eggert
2018-07-21 20:10 ` Helmut Eller [this message]
2018-07-21 21:02 ` Helmut Eller
2018-07-23 19:40 ` Paul Eggert
2018-07-21 18:10 ` Eli Zaretskii
2018-07-21 18:17 ` Paul Eggert
2018-07-21 18:23 ` Eli Zaretskii
2018-07-21 18:42 ` Stefan Monnier
2018-07-21 18:51 ` Eli Zaretskii
2018-07-21 20:42 ` Stefan Monnier
2018-07-21 12:42 ` Helmut Eller
2018-07-21 17:46 ` Paul Eggert
2018-07-23 11:49 ` Andy Moreton
2018-07-23 17:30 ` Paul Eggert
2018-07-23 21:11 ` Andy Moreton
2018-07-24 12:14 ` Andreas Schwab
2018-07-24 13:06 ` Andy Moreton
2018-07-21 9:49 ` Paul Eggert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m27elol58g.fsf@gmail.com \
--to=eller.helmut@gmail.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).