From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: documentation of integers, fixnums and bignums Date: Sat, 08 Sep 2018 18:03:37 -0400 Message-ID: References: <0f632217-27ad-4f54-8ce0-480301fa2a86@cs.ucla.edu> <83pnxorm37.fsf@gnu.org> <92915cae-21d5-c365-89f2-3a15fc9114c4@cs.ucla.edu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1536444165 16154 195.159.176.226 (8 Sep 2018 22:02:45 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 8 Sep 2018 22:02:45 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 09 00:02:40 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 1fylJQ-00046b-JT for ged-emacs-devel@m.gmane.org; Sun, 09 Sep 2018 00:02:40 +0200 Original-Received: from localhost ([::1]:45345 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fylLW-0002Ng-UB for ged-emacs-devel@m.gmane.org; Sat, 08 Sep 2018 18:04:50 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37514) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fylLO-0002NF-F4 for emacs-devel@gnu.org; Sat, 08 Sep 2018 18:04:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fylKW-0003xL-MM for emacs-devel@gnu.org; Sat, 08 Sep 2018 18:03:51 -0400 Original-Received: from [195.159.176.226] (port=46544 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fylKV-0003tL-Ot for emacs-devel@gnu.org; Sat, 08 Sep 2018 18:03:48 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1fylIK-0002wZ-LQ for emacs-devel@gnu.org; Sun, 09 Sep 2018 00:01:32 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 21 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:7sJUQRgRRn6n/6BjGP/gfO0eHC8= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 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:229519 Archived-At: >>> encode-char could potentially return a value that cannot be >>> represented as a fixnum. >> Can this still happen? When? > When INDEX_TO_CODE_POINT returns a code point greater than > most-positive-fixnum, which can happen (in theory, at least) on 32-bit > platforms. Can it, really? > Formerly, such a code point caused Emacs to return a negative > fixnum or junk, depending on the code point. I get the impression that this possibility might have existed back in Emacs-20 but has disappeared since. AFAIK any Unicode codepoint fits in 22 (or even 21?) bits, and while we may use a few extra codepoints IIUC in some corner cases, it should all fit comfortably within our 28 bits of FIXNATs. Stefan