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
conflicting sentences in section "floating literals"? #513
Comments
There is no conflict. The first quoted sentence refers to values within
range but not representable, such as 0.1, but the second refers to values
that are too large or too small.
|
You're misreading (1); it only applies in the case where the scaled value is in the range of representable values. It is intended to be parsed this way:
We could probably clarify this by adding a few words. Maybe something like:
|
Right, sorry for the noise. I skipped over the first parts of the two sentences " If the scaled value is in the range.." and "If the scaled value is NOT in the range.." |
The section numbers below are with reference to the working draft N4431.
" If the scaled value is in the range of representable values for its type, the result is the scaled value if representable, else the larger or smaller representable value nearest the scaled value, chosen in an implementation-defined manner."
"If the scaled value is not in the range of representable values for its type, the program is ill-formed."
The way I am parsing this, the two sentences seem to conflict:
a. According to (1), if the scaled value is not representable, the nearest value is chosen in an implementation-defined manner, so the program is valid and so (2) does not apply.
b. According to (2), if the scaled value is not representable, the program is ill-formed, but (1) should have applied here and so the program must be well-formed.
It seems to me that either of sentences (1) or (2) should be removed (likely (2) ?).
The text was updated successfully, but these errors were encountered: