On Wed, Mar 22, 2023 at 8:52 AM Qing Zhao via Gcc-patches <gcc-patches@gcc.gnu.org> wrote: > > > > > On Mar 22, 2023, at 9:57 AM, Richard Biener via Gcc-patches > > <gcc-patches@gcc.gnu.org> wrote: > > > > On Wed, Mar 22, 2023 at 1:26 PM Alexander Monakov <amona...@ispras.ru> > > wrote: > >> > >> > >> On Wed, 22 Mar 2023, Richard Biener wrote: > >> > >>> I think it's even less realistic to expect users to know the details of > >>> floating-point math. So I doubt any such sentence will be helpful > >>> besides spreading some FUD? > >> > >> I think it's closer to "fundamental notions" rather than "details". For > >> users who bother to read the GCC manual there's a decent chance it wouldn't > >> be for naught. > >> > >> For documentation, I was thinking > >> > >> Together with -fexcess-precision=standard, -ffp-contract=off > >> is necessary to ensure that rounding of intermediate results to precision > >> implied by the source code and the FLT_EVAL_METHOD macro is not > >> omitted by the compiler. > > > > that sounds good to me > > Shall we add such clarification to our Gcc13 doc? That should be helpful if > we keep the currently default. > > Qing > > > >> Alexander >
While updating the documentation, consider adding information that #pragma STDC FP_CONTRACT OFF is ignored with -ffp-contract=fast. This surprising behavior motivated Clang to add -Xclang=-ffp-contract=fast-honor-pragmas (https://discourse.llvm.org/t/fp-contract-fast-and-pragmas/58529). -- 宋方睿