On Mon, 1 Jun 2026 at 09:17, Tomasz Kamiński <[email protected]> wrote:
>
> Fixed typo in r17-509-g7bed7d9276c11b: The __fw should be called with
> __xmin + 0.5 * __delta (as in existing loop), not __xmin * 0.5 * __delta.

OK


>
> libstdc++-v3/ChangeLog:
>
>         * include/bits/random.tcc
>         (piecewise_constant_distribution:::param_type::param_type):
>         Replace * with + in __fw argument.
> ---
>  libstdc++-v3/include/bits/random.tcc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libstdc++-v3/include/bits/random.tcc 
> b/libstdc++-v3/include/bits/random.tcc
> index e581f912764..a8fab79961d 100644
> --- a/libstdc++-v3/include/bits/random.tcc
> +++ b/libstdc++-v3/include/bits/random.tcc
> @@ -3084,7 +3084,7 @@ namespace __detail
>         if (__n == 1)
>           {
>             _RealType __ints[2] = { __xmin, __xmin + __delta };
> -           _RealType __den = __fw(__xmin * 0.5 * __delta);
> +           _RealType __den = __fw(__xmin + 0.5 * __delta);
>             _M_initialize2(__ints, __den);
>             return;
>           }
> --
> 2.54.0
>

Reply via email to