summaryrefslogtreecommitdiff
path: root/mpfr.texi
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2008-11-28 12:09:08 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2008-11-28 12:09:08 +0000
commit7d44b2d40e7ace71e3a617f81cd23d3296830395 (patch)
tree4123c7960286bd0c7e10f1e9c10934ef0af3aab0 /mpfr.texi
parent67ed7f5ec4481446c63bf2418451dee88ff24e3f (diff)
downloadmpfr-7d44b2d40e7ace71e3a617f81cd23d3296830395.tar.gz
urandomb.c: added comments and cleaned up code.
mpfr.texi: improved description of mpfr_urandomb. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@5698 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'mpfr.texi')
-rw-r--r--mpfr.texi8
1 files changed, 6 insertions, 2 deletions
diff --git a/mpfr.texi b/mpfr.texi
index fd2404626..4a9499bb9 100644
--- a/mpfr.texi
+++ b/mpfr.texi
@@ -2243,9 +2243,13 @@ is set to +0.
@deftypefun int mpfr_urandomb (mpfr_t @var{rop}, gmp_randstate_t @var{state})
Generate a uniformly distributed random float in the interval
-@math{0 @le{} @var{rop} < 1}.
+@math{0 @le{} @var{rop} < 1}. More precisely, the number can be seen as a
+float with a random non-normalized significand and exponent 0, which is then
+normalized (thus if @var{e} denotes the exponent after normalization, then
+the least @math{-@var{e}} significant bits of the significand are always 0).
Return 0, unless the exponent is not in the current exponent range, in
-which case @var{rop} is set to NaN and a non-zero value is returned. The
+which case @var{rop} is set to NaN and a non-zero value is returned (this
+should never happen in practice, except in very specific cases). The
second argument is a @code{gmp_randstate_t} structure which should be
created using the GMP @code{gmp_randinit} function, see the GMP manual.
@end deftypefun