From 175f2235115e057ab5d82d4e7f61ddcdbcb44c32 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Thu, 8 Oct 2020 11:58:07 +0100 Subject: [PATCH 01/11] [rand.eng] Blanket wording for placeholders in maths --- source/numerics.tex | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/numerics.tex b/source/numerics.tex index 811f7d9d90..29b39873a7 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -2540,6 +2540,13 @@ and for equality and inequality operators are not shown in the synopses. +\pnum +In the descriptions of the random number engines +and random number engine adaptors +in \ref{rand.eng} and in \ref{rand.adapt}, +a constant such as $c$ takes the value of the non-type template parameter +of the same name, \tcode{c}, unless otherwise specified. + \pnum Each template specified in \ref{rand.eng} requires one or more relationships, From be7cbe55c28e7cbb144b673aab80aaecf9b21460 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Thu, 8 Oct 2020 12:03:31 +0100 Subject: [PATCH 02/11] [rand.eng.lcong] Use maths to simplify relations --- source/numerics.tex | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/source/numerics.tex b/source/numerics.tex index 29b39873a7..d468e1223d 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -2655,12 +2655,10 @@ \end{note} \pnum -If the template parameter -\tcode{m} is not $0$, -the following relations shall hold: - \tcode{a < m} +The following relations shall hold: + $a < m$ and - \tcode{c < m}. + $c < m$. \pnum The textual representation From a66d9a778db3aa9fcb3b7de9ce44ea2fbf01a194 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Thu, 8 Oct 2020 12:03:55 +0100 Subject: [PATCH 03/11] [rand.eng.mers] Use maths to simplify relations --- source/numerics.tex | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/source/numerics.tex b/source/numerics.tex index d468e1223d..4aa04710e7 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -2823,21 +2823,19 @@ \pnum The following relations shall hold: - \tcode{0 < m}, - \tcode{m <= n}, - \tcode{2u < w}, - \tcode{r <= w}, - \tcode{u <= w}, - \tcode{s <= w}, - \tcode{t <= w}, - \tcode{l <= w}, - \tcode{w <= numeric_limits::digits}, - \tcode{a <= (1u<::digits}$, + $r \leq w$, + $u \leq w$, + $s \leq w$, + $t \leq w$, + $l \leq w$, + $a \leq 2^w - 1$, + $b \leq 2^w - 1$, + $c \leq 2^w - 1$, + $d \leq 2^w - 1$, and - \tcode{f <= (1u< Date: Thu, 8 Oct 2020 12:18:59 +0100 Subject: [PATCH 04/11] [rand.eng.sub] Use maths to simplify relations --- source/numerics.tex | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/source/numerics.tex b/source/numerics.tex index 4aa04710e7..678c7fbb14 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -2987,11 +2987,9 @@ \pnum The following relations shall hold: - \tcode{0u < s}, - \tcode{s < r}, - \tcode{0 < w}, + $0 < s < r$ and - \tcode{w <= numeric_limits::digits}. + $0 < w \leq \tcode{numeric_limits::digits}$. \pnum The textual representation From b9c25a70a9c39265cf75fa8d24230e07071a37f9 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Thu, 8 Oct 2020 12:22:31 +0100 Subject: [PATCH 05/11] [rand.adapt.disc] Use maths to simplify relations --- source/numerics.tex | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/source/numerics.tex b/source/numerics.tex index 678c7fbb14..a84bb64822 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -3197,10 +3197,8 @@ \end{codeblock} \pnum -The following relations shall hold: - \tcode{0 < r} -and - \tcode{r <= p}. +The following relation shall hold: + $0 < r \leq p$. \pnum The textual representation From 02170865e5da8f0d75ac36c2d7b4acea496660dd Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Thu, 8 Oct 2020 12:24:01 +0100 Subject: [PATCH 06/11] [rand.adapt.ibits] Use maths to simplify relations --- source/numerics.tex | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/source/numerics.tex b/source/numerics.tex index a84bb64822..9add6f0bc5 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -3341,10 +3341,8 @@ \end{codeblock}% \pnum -The following relations shall hold: - \tcode{0 < w} -and - \tcode{w <= numeric_limits::digits}. +The following relation shall hold: + $0 < w \leq \tcode{numeric_limits::digits}$. \pnum The textual representation From 756ce3e38dccfa3a8599c3a89db21fd881fa2ff4 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Thu, 8 Oct 2020 12:25:02 +0100 Subject: [PATCH 07/11] [rand.adapt.shuf] Use maths to simplify relations --- source/numerics.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/numerics.tex b/source/numerics.tex index 9add6f0bc5..bb161f5338 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -3445,7 +3445,7 @@ \pnum The following relation shall hold: - \tcode{0 < k}. + $0 < k$. \pnum The textual representation From 7957e0bef9e41ca051d042419d62d4344dd89b51 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Thu, 8 Oct 2020 12:39:13 +0100 Subject: [PATCH 08/11] [rand.eng.mers], [rand.end.sub] use result_type instead of UIntType --- source/numerics.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/numerics.tex b/source/numerics.tex index bb161f5338..7e4bd4baca 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -2824,7 +2824,7 @@ \pnum The following relations shall hold: $0 < m \leq n$, - $2 < w \leq \tcode{numeric_limits::digits}$, + $2 < w \leq \tcode{numeric_limits::digits}$, $r \leq w$, $u \leq w$, $s \leq w$, @@ -2989,7 +2989,7 @@ The following relations shall hold: $0 < s < r$ and - $0 < w \leq \tcode{numeric_limits::digits}$. + $0 < w \leq \tcode{numeric_limits::digits}$. \pnum The textual representation From bdfc8eddb800dd2a4e78bb5e832591a3522e156d Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Thu, 8 Oct 2020 12:49:24 +0100 Subject: [PATCH 09/11] [rand.eng.sub] Do not use code font for constant r --- source/numerics.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/numerics.tex b/source/numerics.tex index 7e4bd4baca..906b5bd851 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -3027,7 +3027,7 @@ \pnum \complexity -Exactly $n \cdot \tcode{r}$ invocations +Exactly $n \cdot r$ invocations of \tcode{e}. \end{itemdescr} From 3cd6074f377b6ab064739db51bcab2477d9aa889 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Thu, 8 Oct 2020 12:50:59 +0100 Subject: [PATCH 10/11] [rand.eng.lcong] Do not use code font for constant s --- source/numerics.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/numerics.tex b/source/numerics.tex index 906b5bd851..624e932959 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -2673,9 +2673,9 @@ \begin{itemdescr} \pnum \effects - If $c \bmod m$ is $0$ and $\tcode{s} \bmod m$ is $0$, + If $c \bmod m$ is $0$ and $s \bmod m$ is $0$, sets the engine's state to $1$, - otherwise sets the engine's state to $\tcode{s} \bmod m$. + otherwise sets the engine's state to $s \bmod m$. \end{itemdescr} \indexlibraryctor{linear_congruential_engine}% From 5383a93e18dd60ff831ca3120b07e8bb7a5ccbf2 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Thu, 8 Oct 2020 12:53:57 +0100 Subject: [PATCH 11/11] [rand.adapt.shuf] Do not use code font for Y --- source/numerics.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/numerics.tex b/source/numerics.tex index 624e932959..7795ac68e2 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -3389,7 +3389,7 @@ \pnum The generation algorithm -yields the last value of \tcode{Y} +yields the last value of $Y$ produced while advancing \tcode{e}'s state as described above. \indexlibraryglobal{shuffle_order_engine}%