cplusplus / papers

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

P3375 R1 Reproducible floating-point results #2035

Open wg21bot opened 2 months ago

wg21bot commented 2 months ago

P3375R0 Reproducible floating-point results (Guy Davidson)

inbal2l commented 2 months ago

@mattkretz - removing LEWG tag for now, please retag once SG6 review is done.

wg21bot commented 1 month ago

P3375R1 Reproducible floating-point results (Guy Davidson)

mattkretz commented 4 days ago

P3375R1: Reproducible floating-point results

2024-11-18 SG6 Minutes

Chair: Matthias Kretz

Champion: Guy Davidson

Summary

There is a much larger design space that a class template could cover, in terms of controlling value-changing optimizations. If we tie one specific set of 60559 attributes to one class template are we going to get a proliferation of types at some point?

Also, if we provide non-member functions for doing individual reproducible floating-point operations then these can be used as a building block for a type with overloaded operators. The other way around is muss less ergonomic (if a user needs to apply "strict" operations to an array of "plain" floating-point objects and go via a type).

The paper also needs to consider how important the reproducible "status flags" part of 60559 §11 is for its users. This comes at a significant cost to the optimizer, but is only necessary in very few places, where fenv access functions are used.

We all recommended hidden friends for the binary operators, but then there likely won't be a type in the next revision of the paper anymore.

Polls

No polls were taken.