Skip to content
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

[basic.fundamental] Wording implies existence of unique maximum value of floating-point types #6370

Closed
ilazaric opened this issue Jul 6, 2023 · 3 comments

Comments

@ilazaric
Copy link

ilazaric commented Jul 6, 2023

draft/source/basic.tex

Lines 5065 to 5067 in 384d36a

Properties of the arithmetic types,
such as their minimum and maximum representable value,
can be queried using the facilities in the standard library headers

To me this implies existence of a unique maximum representable value of float
float values are not totally ordered, NaN is not comparable with anything
In terms of partial orders both +inf and all NaN values would be considered maximal elements

Same thought is applicable to other floating-point types, and to minimum instead of maximum

I feel that a person that is not familiar with IEEE-754 could come to wrong conclusions regarding floating-point types

I don't think a deep elaboration is needed or necessary
A simple finite word addition could be sufficient, would match max() behaviour of std::numeric_limits

@jensmaurer
Copy link
Member

This is a note, and the mentioned facilities do allow to query for NaNs as well as infinities and finite min/max values, so I'm not seeing anything wrong here. We don't mention a max facility in particular.

@jwakely
Copy link
Member

jwakely commented Jul 6, 2023

And adding "finite" wouldn't make sense for the integral types. I don't think anything needs to change here.

@jwakely
Copy link
Member

jwakely commented Jul 6, 2023

Specifically, I don't think anybody is drawing conclusions about floating point types from this piece of wording.

@jensmaurer jensmaurer closed this as not planned Won't fix, can't repro, duplicate, stale Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants