Skip to content

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

Not planned
@ilazaric

Description

@ilazaric

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

Activity

jensmaurer

jensmaurer commented on Jul 6, 2023

@jensmaurer
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

jwakely commented on Jul 6, 2023

@jwakely
Member

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

jwakely

jwakely commented on Jul 6, 2023

@jwakely
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @jwakely@ilazaric@jensmaurer

        Issue actions

          [basic.fundamental] Wording implies existence of unique maximum value of floating-point types · Issue #6370 · cplusplus/draft