Subject: 26.1; (random) never returns negative
From: Francis Wright <[email-masked]>
To: [email-masked]
Date: Sat, 01 Sep 2018 18:18:01 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

According to my reading of both the documentation for the function
random and its description in the manual, if it is called with no
argument then "the value might be any integer representable in Lisp,
i.e., an integer between ‘most-negative-fixnum’ and
‘most-positive-fixnum’".  Therefore, it should return a negative integer
half the time, but I have never yet seen it return a negative value.  So
either the documentation or the implementation is wrong.  For what it's
worth, I would prefer the documented behaviour over the current actual
behaviour.

In GNU Emacs 26.1 (build 1, x86_64-w64-mingw32)
 of 2018-05-30 built on CIRROCUMULUS
Repository revision: 07f8f9bc5a51f5aa94eb099f3e15fbe0c20ea1ea
Windowing system distributor 'Microsoft Corp.', version 10.0.17134
Recent messages:
Canceling debug-on-entry for all functions
You can run the command ‘cancel-debug-on-entry’ with M-x ca-d-e RET
Canceling debug-on-entry for all functions
1515484088033472457 / 2067076301065092720
t [2 times]
Mark set [2 times]
Saving file c:/Users/fjw/REDUCE@SourceForge/emacs/REDUCE/Big Integer Support/eslbigint.el...
Wrote c:/Users/fjw/REDUCE@SourceForge/emacs/REDUCE/Big Integer Support/eslbigint.el
Type "q" in help window to restore its previous buffer.
mwheel-scroll: End of buffer [6 times]
mwheel-scroll: Beginning of buffer [9 times]
Configured using:
 'configure --without-dbus --host=x86_64-w64-mingw32
 --without-compress-install 'CFLAGS=-O2 -static -g3''

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS THREADS LCMS2

Important settings:
  value of $LANG: ENG
  locale-coding-system: cp1252

Major mode: Info

Minor modes in effect:
  diff-auto-refine-mode: t
  shell-dirtrack-mode: t
  show-paren-mode: t
  delete-selection-mode: t
  electric-pair-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-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
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny rfc822 mml mml-sec epa
derived epg gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils info eieio-opt speedbar
sb-image ezimage dframe find-func help-fns radix-tree cl-extra thingatpt
misearch multi-isearch edebug reposition time-stamp help-mode cl-print
debug vc-git diff-mode easy-mmode vc-dispatcher vc-svn dired
dired-loaddefs flyspell ispell imenu tramp tramp-compat tramp-loaddefs
trampver ucs-normalize shell pcomplete comint ansi-color ring parse-time
format-spec advice paren delsel cus-start cus-load finder-inf package
easymenu epg-config url-handlers url-parse auth-source cl-seq eieio
eieio-core cl-macs eieio-loaddefs password-cache url-vars seq byte-opt
gv bytecomp byte-compile cconv cl-loaddefs cl-lib elec-pair server
time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win
w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame 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 minibuffer 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 w32notify w32 lcms2 multi-tty make-network-process emacs)

Memory information:
((conses 16 277958 12135)
 (symbols 56 26263 1)
 (miscs 48 215 603)
 (strings 32 53052 3399)
 (string-bytes 1 1403187)
 (vectors 16 43081)
 (vector-slots 8 801770 16514)
 (floats 8 79 425)
 (intervals 56 1601 17)
 (buffers 992 18))