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

P1890 C++ Numerics Work In Progress Issues #639

Closed
wg21bot opened this issue Oct 15, 2019 · 2 comments
Closed

P1890 C++ Numerics Work In Progress Issues #639

wg21bot opened this issue Oct 15, 2019 · 2 comments
Labels
B3 - addition Bucket 3 as described by P0592: material that is not mentioned in P0592 needs-revision Paper needs changes before it can proceed numerics numerics-ts-1 SG6 Numerics size - large paper size estimate TS Ship vehicle: TS

Comments

@wg21bot
Copy link
Collaborator

wg21bot commented Oct 15, 2019

P1890R0 C++ Numerics Work In Progress Issues (Antony Polukhin, Alexander Zaitsev)

@wg21bot wg21bot added the SG6 Numerics label Oct 15, 2019
@wg21bot wg21bot added this to the 2019-11 milestone Oct 15, 2019
@brycelelbach brycelelbach added the LEWGI Library Evolution Incubator label Oct 30, 2019
@brycelelbach
Copy link

Belfast 2019-11 LEWGI Minutes

P1890R0 C++ Numerics Library Issues: Design Review

Chair: Bryce Adelstein Lelbach

Champion: Antony Polukhin

Minute Taker: Conor Hoekstra

Start Review: 11-08 13:41

POLL: An API that is source compatible with C should be a design priority for the overflow detecting functions (C currently does not have these functions and there is no proposal to add them yet).

Strongly For Weakly For Neutral Weakly Against Strongly Against
1 1 3 3 4

Attendance: 17

# of Authors: 2

Author Position: SF SA

That has consensus against.

// Option 0
constexpr T overflow_add(bool& overflow_occurred, T augend, T addend) noexcept;

// Option 1
constexpr bool overflow_add(T& summand, T augend, T addend) noexcept;

// Option 2 (consistent with the existing builtins modulo argument order)
constexpr bool overflow_add(T* summand, T augend, T addend) noexcept;

// Option 3
template <typename T>
struct overflow_result {
  bool overflow;
  T value;
  // Convertiblity to bool to be explored.
};
constexpr overflow_result<T> overflow_add(T augend, T addend) noexcept;

POLL: API design for the overflow detecting (vote once for your favorite option).

Option Vote
0 0
1 0
2 2
3 4

Attendance: 17

# of Authors: 2

Author Position: 2 3

Lack of quorum; no consensus.

POLL: The overflow detecting functions should support only fundamental integer types.

Strongly For Weakly For Neutral Weakly Against Strongly Against
1 2 3 1 2

Attendance: 17

# of Authors: 1

Author Position: A

Lack of quorum; no consensus.

End: 15:27

CONSENSUS: Bring a revision of P1890R0 (C++ Numerics Library Issues), with the guidance below, to LEWGI for further design review.

  • Explore modern C++ style APIs for the low-level interfaces such as the overflow detecting functions.
  • Make the macros double_word_ops typedefs.
  • Explore removing common_type specializations in place of making the types work with the ternary operator.

@brycelelbach brycelelbach added the needs-revision Paper needs changes before it can proceed label Nov 9, 2019
@jensmaurer jensmaurer removed this from the 2019-11 milestone Dec 12, 2019
@brycelelbach brycelelbach added LEWG Library Evolution B3 - addition Bucket 3 as described by P0592: material that is not mentioned in P0592 TS Ship vehicle: TS numerics-ts-1 and removed LEWGI Library Evolution Incubator labels Aug 25, 2020
@brycelelbach brycelelbach added numerics size - large paper size estimate and removed LEWG Library Evolution labels May 24, 2023
@brycelelbach
Copy link

Closing due to more than 1 year of inactivity. Please re-open if further work is expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B3 - addition Bucket 3 as described by P0592: material that is not mentioned in P0592 needs-revision Paper needs changes before it can proceed numerics numerics-ts-1 SG6 Numerics size - large paper size estimate TS Ship vehicle: TS
Projects
None yet
Development

No branches or pull requests

3 participants