From unknown Tue Jun 17 01:48:22 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55334: Incorrect documentation of "string-to-number" function Resent-From: emacs@kaction.cc Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 09 May 2022 07:05:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 55334 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 55334@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.165207989317934 (code B ref -1); Mon, 09 May 2022 07:05:04 +0000 Received: (at submit) by debbugs.gnu.org; 9 May 2022 07:04:53 +0000 Received: from localhost ([127.0.0.1]:55843 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nnxRs-0004f6-B3 for submit@debbugs.gnu.org; Mon, 09 May 2022 03:04:53 -0400 Received: from lists.gnu.org ([209.51.188.17]:55704) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nnweY-00019m-Fj for submit@debbugs.gnu.org; Mon, 09 May 2022 02:13:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46790) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nnweW-0004f2-Lo for bug-gnu-emacs@gnu.org; Mon, 09 May 2022 02:13:53 -0400 Received: from out0.migadu.com ([94.23.1.103]:51936) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nnweS-00068b-Ll for bug-gnu-emacs@gnu.org; Mon, 09 May 2022 02:13:52 -0400 Date: Mon, 9 May 2022 02:13:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kaction.cc; s=key1; t=1652076821; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=0O0EaVYhVoihYRJJFcU5WKxgwBOhhxx4Y7PTovWhCQI=; b=hunvkqcqFlal1sgrj951kIyWVU8Qtmd/n45dKFzWECh0gZn/etX/na7J9kXn1d5UUfzLcq ln1wjY0O+7rqiJB7nkG2hvwaCYNo1PwrqxURKG6x5uGB7Sfiyz5Q1Hfw188gJraszR8Pmt tq9gbFeHtMWQA+/nHN0aY39/eYx3VVnoyJTQCKr6lIfyndkIQGhuD77bUC/eN+loPBGhOh jLQBERjLOje5svp6QrjTPoThkKoEkFga0f5B+OXb1fHAemp/vLJdNMpvQBwweb3JxcObKA YivGTvX6iUe68vIhAmVsDyP5t1NhE6ADn2tThpTYaLgVLDl9jywG1aUgXmpDTA== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: emacs@kaction.cc Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: kaction.cc Received-SPF: pass client-ip=94.23.1.103; envelope-from=oht-tah-rznpf#tah.bet#i1@kaction.cc; helo=out0.migadu.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Mailman-Approved-At: Mon, 09 May 2022 03:04:46 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) As of commit [364e3d7] (2022-05-09), doc/lispref/strings.texi says following about "string-to-number" function: https://git.savannah.gnu.org/cgit/emacs.git/tree/doc/lispref/strings.texi#n851 @defun string-to-number string &optional base @cindex string to number This function returns the numeric value of the characters in @var{string}. If @var{base} is non-@code{nil}, it must be an integer between 2 and 16 (inclusive), and integers are converted in that base. If @var{base} is @code{nil}, then base ten is used. Floating-point conversion only works in base ten; we have not implemented other radices for floating-point numbers, because that would be much more work and does not seem useful. If @var{string} looks like an integer but its value is too large to fit into a Lisp integer, @code{string-to-number} returns a floating-point result. Last paragraph does not match behaviour I can observe on my emacs: (floatp (string-to-number (number-to-string (expt 2 800)))) => nil (bignump (string-to-number (number-to-string (expt 2 800)))) => t I think this paragraph was written before advent of bignums, and should be removed. Configured using: 'configure --prefix=/nix/store/svyam9iybwcl5g7wrll1sgwhilw33f9k-emacs-27.2 --disable-build-details --with-modules --with-x-toolkit=gtk3 --with-xft --with-cairo' Configured features: XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND DBUS GSETTINGS GLIB NOTIFY INOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD JSON PDUMPER GMP Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: global-git-commit-mode: t magit-auto-revert-mode: t paredit-mode: t company-mode: t shell-dirtrack-mode: t evil-mode: t evil-local-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: /home/kaction/devel/emacs/emacs-nix-environment/nix-environment hides /home/kaction/.emacs.d/elpa/nix-environment-1.0/nix-environment Features: (shadow sort mail-extr emacsbug sendmail apropos jka-compr lisp-mnt mule-util pp vc-git cus-edit cus-start cus-load wid-edit finder-inf magit-repos magit-apply magit-wip magit-log which-func imenu magit-diff smerge-mode diff diff-mode git-commit rx log-edit message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail rmail-loaddefs text-property-search mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev gmm-utils pcvs-util add-log magit-core magit-autorevert magit-margin magit-transient magit-process with-editor server magit-mode transient magit-git magit-base magit-section crm help-fns radix-tree cl-print debug backtrace paredit company-oddmuse company-keywords company-etags etags fileloop xref project company-gtags company-dabbrev-code company-dabbrev company-files company-clang company-capf company-cmake company-semantic company-template company-bbdb company alect-black-theme alect-themes llama evil evil-keybindings evil-integration evil-maps evil-commands reveal flyspell ispell evil-jumps evil-command-window evil-search evil-ex shell evil-types evil-macros evil-repeat evil-states evil-core evil-common windmove calc calc-loaddefs calc-macs thingatpt rect evil-digraphs evil-vars ejira-agenda org-agenda ejira-agile ejira edmacro kmacro ejira-core pcase ejira-parser org-capture org-id org-refile dash-functional language-detection ox-jira ox-odt rng-loc rng-uri rng-parse rng-match rng-dt rng-util rng-pttrn nxml-parse nxml-ns nxml-enc xmltok nxml-util ox-latex ox-icalendar ox-html table ox-ascii ox-publish ox org-element org ob ob-tangle ob-ref ob-lob ob-table org-macro org-footnote org-src ob-comint org-pcomplete pcomplete comint ansi-color ring org-list org-faces org-entities time-date noutline outline easy-mmode org-version ob-emacs-lisp org-table org-keys org-loaddefs find-func cal-menu calendar cal-loaddefs avl-tree generator ol ob-exp ob-core org-compat advice ob-eval org-macs format-spec jiralib2 request mailheader autorevert filenotify mail-utils url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap f dash s cl-extra help-mode use-package-ensure use-package-core keychain-environment nix-environment async w3m-load info package easymenu browse-url url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 548656 142469) (symbols 48 37539 2) (strings 32 190251 24393) (string-bytes 1 5455638) (vectors 16 246978) (vector-slots 8 1696599 60880) (floats 8 91200 126) (intervals 56 1255 78) (buffers 1000 18)) From unknown Tue Jun 17 01:48:22 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55334: Incorrect documentation of "string-to-number" function Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 09 May 2022 09:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55334 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: emacs@kaction.cc Cc: 55334@debbugs.gnu.org Received: via spool by 55334-submit@debbugs.gnu.org id=B55334.165209030621133 (code B ref 55334); Mon, 09 May 2022 09:59:02 +0000 Received: (at 55334) by debbugs.gnu.org; 9 May 2022 09:58:26 +0000 Received: from localhost ([127.0.0.1]:56188 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1no09q-0005Ui-6P for submit@debbugs.gnu.org; Mon, 09 May 2022 05:58:26 -0400 Received: from quimby.gnus.org ([95.216.78.240]:40086) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1no09m-0005UP-MB for 55334@debbugs.gnu.org; Mon, 09 May 2022 05:58:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=NsfRc7NvGANd6dI9zrIHmd2b7fxd9Mxn7J2uzSWD5hU=; b=T4FpmND1naQmHFqCo6z7pR4dns 0XRW6T9BF4vEHd0c+/x1GJgZeYXQbyKQlJjKssAWPb+R7oblD3vIIBvv2M6hPm+L7WvBD/dAEEzzc z/WiP2o95JfUlC85hikqh6hjwddiiXILXgDGPwHx811cVpAhU6zElMxK0FgDfMTJWrao=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1no09e-0004L2-1z; Mon, 09 May 2022 11:58:16 +0200 From: Lars Ingebrigtsen References: X-Now-Playing: Blaine L. Reininger's _Broken Fingers_: "Spiny Doughboys" Date: Mon, 09 May 2022 11:58:13 +0200 In-Reply-To: (emacs@kaction.cc's message of "Mon, 9 May 2022 02:13:38 -0400") Message-ID: <87ee13auyy.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: emacs@kaction.cc writes: > I think this paragraph was written before advent of bignums, and > should be removed. Yup. I've now updated the manual for Emacs 28.2. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) emacs@kaction.cc writes: > I think this paragraph was written before advent of bignums, and > should be removed. Yup. I've now updated the manual for Emacs 28.2. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon May 09 05:58:29 2022 Received: (at control) by debbugs.gnu.org; 9 May 2022 09:58:29 +0000 Received: from localhost ([127.0.0.1]:56191 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1no09t-0005V2-Cz for submit@debbugs.gnu.org; Mon, 09 May 2022 05:58:29 -0400 Received: from quimby.gnus.org ([95.216.78.240]:40100) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1no09r-0005UW-GH for control@debbugs.gnu.org; Mon, 09 May 2022 05:58:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=tWKhEGkB1oaqSLTU5Dl2wA9PkNtogVWnfWHWa099dOk=; b=JIBHWNKfQTh0G0xzeE72ruIw5Y FXerjdiszircOlKKmja8qU83h1V2ErXq4QUbJJatEujk18IgZOLfdCkK6b7SmqaWE8T7TmhKTXcH9 Ad//wAL3YJckMWZWRPAAw3EXf/Eb34P8EtIWMINxEU2k9uC1r4OFoRYb6+K0NhRgDVIo=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1no09j-0004LB-QR for control@debbugs.gnu.org; Mon, 09 May 2022 11:58:21 +0200 Date: Mon, 09 May 2022 11:58:19 +0200 Message-Id: <87czgnauys.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #55334 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 55334 29.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 55334 29.1 quit