cplusplus / papers

ISO/IEC JTC1 SC22 WG21 paper scheduling and management
648 stars 18 forks source link

P2551 Clarify intent of P1841 numeric traits #1211

Open wg21bot opened 2 years ago

wg21bot commented 2 years ago

P2551R0 Clarify intent of P1841 numeric traits (Matthias Kretz, Jonathan Wakely)

billy-baker commented 2 years ago

2022-03-29 Library Evolution Telecon

P2551R0: Clarify intent of P1841 numeric traits

2022-03-29 Library Evolution Telecon Minutes

Chair: Billy Baker

Champion: Matthias Kretz

Minute Taker: Ben Craig

Poll: Numeric traits can deviate from numeric_limits.

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
13 8 0 0 0

Attendance: 33

# of Authors: P2551: 1

Author Position: P2551: SF, P1841/P0437: no vote

Outcome: Consensus to allow deviation of numeric traits from numeric_limits.

P1841/P0437 author: did not vote, bad poll, contradicts original design of P0437

Poll: Numeric traits should be based on representation rather than behavior (ignoring reciprocal_overflow_threshold).

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
7 5 2 0 0

Attendance: 34

# of Authors: P2551: 1

Author Position: P2551: SF, P1841/P0437: no vote

Outcome: Consensus in favor of basing on representation rather than behavior.

Poll: All numeric traits for bool should be disabled.

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
12 6 1 0 0

Attendance: 33

# of Authors: P2551: 1

Author Position: P2551: SF, P1841/P0437: no vote

Outcome: Consensus to disable bool for numeric traits.

Poll: The numeric traits that are not meaningful for numeric_limits (denorm_min, epsilon, etc) should be disabled for integral types.

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
14 3 0 0 0

Attendance: 33

# of Authors: 1

Author Position: P2551: SF, P1841/P0437: no vote

Outcome: Consensus in favor of disabling traits that are not meaningful for integral types.

Poll: max_digits10 should deviate from numeric_limits and yields digits10_v + 1.

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
6 5 2 0 0

Attendance: 34

# of Authors: P2551: 1

Author Position: P2551: SF, P1841/P0437: no vote

Outcome: Consensus in favor of max_digits10 deviating from the numeric_limits value.

Summary

These polls cover part of the questions in P2551 Clarify intent of P1841 numeric traits. The paper will need additional time for the questions related to reciprocal_overflow_threshold. There was consensus for deviating from numeric_limits. A user will have to make the decision to replace <limits>/numeric_limits usage with <numbers>/numeric traits. The possibility of ABI issues with floating point was mentioned as an already existing possibility. Deviation does mean that it may not be possible to excise numeric_limits in the future as P0437 Numeric Traits for the Standard Library suggested.

Next Steps

Update the paper to make the aforementioned changes and return to Library Evolution for further design review.

wg21bot commented 2 years ago

P2551R1 Clarify intent of P1841 numeric traits (Matthias Kretz, Jonathan Wakely)

brycelelbach commented 2 years ago

2022-06-07 Library Evolution Telecon

P2551R1: Clarify intent of P1841 numeric traits

2022-06-07 Library Evolution Telecon Minutes

Chair: Bryce Adelstein Lelbach

Minute Taker: Ben Craig

Champion: Matthias Kretz

Start: 2022-06-07 11:10 Eastern

POLL: Remove reciprocal_overflow_threshold from P1841.

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
6 4 1 0 0

Attendance: 22

# of Authors: 1

Author Position: SF

Outcome: Strong consensus in favor.

End: 11:20

Summary

We discussed reciprocal_overflow_threshold from P1841R3 (Individually Specializable Numeric Traits). Since the actual reciprocal overflow threshold depends on runtime state, we’re not sure who would/should use a compile-time constant. Library Evolution agreed that we should remove it from P1841R3.

Next Steps

Take an electronic poll to confirm the following changes to P1841 (Individually Specializable Numeric Traits) and return it to Library for C++23 classified as B3:

wg21bot commented 2 years ago

P2551R2 Clarify intent of P1841 numeric traits (Matthias Kretz, Jonathan Wakely)

brycelelbach commented 2 years ago

2022-07 Library Evolution Electronic Poll Outcomes

Poll 1.11: Send [P2551R2] Clarify Intent Of Individually Specializable Numeric Traits to Library Working Group for C++23, classified as an addition ([P0592R4] bucket 3 item).

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
12 8 0 0 0

Outcome: Unanimous consensus in favor.

JeffGarland commented 2 weeks ago

There's no active follow-on for this paper at the moment -- setting to blocked.