New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[rand.util.canonical] Convert normative duplication into a note. #3820
Conversation
This seems more economical and less ad-hoc. @opensdh: would you care to opine? |
produced by \tcode{g} | ||
are uniformly distributed, | ||
the instantiation's results | ||
$t_j$, $0 \leq t_j < 1$, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This normative text claims something desirable that the algorithm does not satisfy (because the algorithm is buggy: LWG2524). Should we wait to remove it until we have corrected the algorithm?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To my reading, the old wording only said that results in [0, 1) are uniformly distributed, and didn't say the results were necessarily in that range (and didn't say anything at all about the results being in [0,1) if g
doesn't produce uniformly distributed results). But it does seem ambiguous. I think the new note below is correct, though: S/R^k is in [0, 1), because it's a real number, prior to the conversion to RealType
. (Though what "using arithmetic of type RealType
" means is anyone's guess.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It reads to me as if the inequality is an aside that's meant to apply to all values, and it's certainly not the case (in reality) that some are more uniformly distributed than others. You're right that it seems to be conditioned on the uniform distribution from g
. The new note is plainly correct; I'm just a little uneasy about making the standard unambiguously say something bad (before fixing it to say something good anywhere). I don't really think that anyone is going to reject P0952 because of this pull request; it's just a feeling about proper ordering.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, so how do we proceed? This existing paragraph smells bad, and I want to do something to it. I don't want to promote the aside the 0 <= t_j < 1 into an actual specification over the produced value of type RealType
, because I don't think that is required by the current wording; this whole paragraph reads as a non-normative description of the intent of the math specified below. But we are in a pickle, because the intent is correct and the math is wrong.
Perhaps I should just pretend I didn't see this and wait for your paper to fix it :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am generically in favor of the editors changing the standard as and only as I see fit, yes.
Anyway, you have an approval from the first author of that paper. If you want to be rid of this, go ahead; I have already said I don't predict any actual harm (and implementations already do the bad thing that the rest of the wording specifies). But I'd be marginally happier waiting (the paper won't even conflict with this).
I agree that in general this is a good idea. |
061f966
to
e0b510f
Compare
I've also voiced similar concerns to Richard offline, but it seems like
this change is creating a mildly more tolerable situation, and as you said,
it shouldn't interfere with our paper (which will fix this once and for
all).
…On Thu, 5 Mar 2020, 01:47 Davis Herring, ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In source/numerics.tex
<#3820 (comment)>:
> @@ -4419,37 +4419,10 @@
\rSec3[rand.util.canonical]{Function template \tcode{generate_canonical}}%
\indexlibraryglobal{generate_canonical}%
-\pnum
- Each function instantiated
- from the template
- described in this subclause~\ref{rand.util.canonical}
- maps the result of one or more invocations
- of a supplied uniform random bit generator \tcode{g}
- to one member
- of the specified \tcode{RealType}
- such that,
- if the values $g_i$
- produced by \tcode{g}
- are uniformly distributed,
- the instantiation's results
- $t_j$, $0 \leq t_j < 1$,
I am generically in favor of the editors changing the standard as and only
as I see fit, yes.
Anyway, you have an approval from the first author of that paper. If you
want to be rid of this, go ahead; I have already said I don't predict any
actual harm (and implementations already do the bad thing that the rest of
the wording specifies). But I'd be marginally happier waiting (the paper
won't even conflict with this).
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#3820?email_source=notifications&email_token=ABQVF6P5BEJCQ4UVFLMJKETRF4ABJA5CNFSM4LB6OCA2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCYBD75A#discussion_r388036398>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABQVF6ISMDQLCQASHLW74TTRF4ABJANCNFSM4LB6OCAQ>
.
|
No description provided.