unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stephen Berman <stephen.berman@gmx.net>
To: Francis Wright <francis.j.wright@gmail.com>
Cc: f.j.wright@live.co.uk, 32605@debbugs.gnu.org
Subject: bug#32605: 26.1; (random) never returns negative
Date: Sat, 01 Sep 2018 19:34:35 +0200	[thread overview]
Message-ID: <87zhx1ktp0.fsf@gmx.net> (raw)
In-Reply-To: <855zzpf86u.fsf@gmail.com> (Francis Wright's message of "Sat, 01 Sep 2018 18:18:01 +0100")

On Sat, 01 Sep 2018 18:18:01 +0100 Francis Wright <francis.j.wright@gmail.com> wrote:

> 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

Prompted by this report, I just ran `M-: (random)' twice, with these
results:

1407814790132564328 (#o116114401367331100550, #x13899017bb648168)
-5902216973509885 (#o-247600437205762375, #x-14f808fa17e4fd)

This was on a build from current master under GNU/Linux

Steve Berman





  reply	other threads:[~2018-09-01 17:34 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-01 17:18 bug#32605: 26.1; (random) never returns negative Francis Wright
2018-09-01 17:34 ` Stephen Berman [this message]
2018-09-04 22:27   ` Noam Postavsky
2018-09-05 13:20     ` Andy Moreton
2021-08-12 13:17       ` bug#32605: [w64] " Lars Ingebrigtsen
2021-08-12 13:42         ` Eli Zaretskii
2021-08-12 20:34           ` Andy Moreton
2021-08-13  6:29             ` Eli Zaretskii
2021-08-13 21:12               ` Andy Moreton
2021-08-14  5:54                 ` Eli Zaretskii
2021-08-14  8:31                   ` Andy Moreton
2021-08-14  8:57                     ` Eli Zaretskii
2021-08-14 11:06                       ` Andy Moreton
2021-08-14 11:33                         ` Eli Zaretskii
2021-08-14 12:10                           ` Andy Moreton
2021-08-14 12:36                             ` Eli Zaretskii
2021-08-14 13:40                               ` Andy Moreton
2021-08-14 14:43                                 ` Eli Zaretskii
2021-08-14 18:47                                   ` Andy Moreton
2021-08-15  6:07                                     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zhx1ktp0.fsf@gmx.net \
    --to=stephen.berman@gmx.net \
    --cc=32605@debbugs.gnu.org \
    --cc=f.j.wright@live.co.uk \
    --cc=francis.j.wright@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).