From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: emacs--- via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#55334: Incorrect documentation of "string-to-number" function Date: Mon, 9 May 2022 02:13:38 -0400 Message-ID: Reply-To: emacs@kaction.cc Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18276"; mail-complaints-to="usenet@ciao.gmane.io" To: 55334@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 09 09:06:18 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nnxTG-0004Zk-FX for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 09 May 2022 09:06:18 +0200 Original-Received: from localhost ([::1]:40746 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nnxTD-0005f9-8v for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 09 May 2022 03:06:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56668) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nnxS5-0005e6-81 for bug-gnu-emacs@gnu.org; Mon, 09 May 2022 03:05:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33718) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nnxS4-0004yx-Vg for bug-gnu-emacs@gnu.org; Mon, 09 May 2022 03:05:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nnxS4-0004gC-R1 for bug-gnu-emacs@gnu.org; Mon, 09 May 2022 03:05:04 -0400 X-Loop: help-debbugs@gnu.org 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-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.165207989317934 (code B ref -1); Mon, 09 May 2022 07:05:04 +0000 Original-Received: (at submit) by debbugs.gnu.org; 9 May 2022 07:04:53 +0000 Original-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 Original-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 Original-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 Original-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 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. 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-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 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:231693 Archived-At: 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))