[New-bugs-announce] [issue6261] Clarify behaviour of random.uniform
Mark Dickinson
report at bugs.python.org
Wed Jun 10 23:30:28 CEST 2009
New submission from Mark Dickinson <dickinsm at gmail.com>:
The documentation for random.uniform() was recently updated to reflect
the fact that it's possible for random.uniform(a, b) to produce the
value b; see issue 4979.
In a recent c.l.p. thread, Robert Kern suggested that 'it
might be confusing to a user why random.random() returns values in a
half-open interval while random.uniform() claims a closed interval';
the thread itself confirms this potential for confusion. See
http://mail.python.org/pipermail/python-list/2009-June/715851.html
Suggested extra wording for random.uniform, from Robert Kern:
"Due to floating point arithmetic, for some values of a and b, b may or
may not be one of the possible generated results."
----------
assignee: georg.brandl
components: Documentation
messages: 89232
nosy: georg.brandl, marketdickinson
severity: normal
status: open
title: Clarify behaviour of random.uniform
versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1, Python 3.2
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6261>
_______________________________________
More information about the New-bugs-announce
mailing list