* bug#55334: Incorrect documentation of "string-to-number" function
@ 2022-05-09 6:13 emacs--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-09 9:58 ` Lars Ingebrigtsen
0 siblings, 1 reply; 2+ messages in thread
From: emacs--- via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-05-09 6:13 UTC (permalink / raw)
To: 55334
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))
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#55334: Incorrect documentation of "string-to-number" function
2022-05-09 6:13 bug#55334: Incorrect documentation of "string-to-number" function emacs--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-05-09 9:58 ` Lars Ingebrigtsen
0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2022-05-09 9:58 UTC (permalink / raw)
To: emacs; +Cc: 55334
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-09 9:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-09 6:13 bug#55334: Incorrect documentation of "string-to-number" function emacs--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-09 9:58 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.