<div dir="ltr">Paul -<div><br></div><div>Could you say more about what CORE-MATH is trying to do? Or give us a pointer to a good paper to read?<div><br></div><div>The idea is that you would have a single routine for each of these functions, independent of rounding mode? Presumably the usual implementation would either avoid non-motonically-increasing operations, i.e. negation, subtraction and division, or use them only in code that is not material to the accuracy of the final result?</div><div><br></div><div>So this code could be used to implement either C23 static rounding modes, or conceivably correctly rounded functions with explicit rounding mode parameters? It just might not be the most efficient way to do so, since you could call different functions for the different rounding modes instead?</div></div><div><br></div><div>Hans</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Feb 21, 2023 at 11:20 AM Paul Zimmermann <<a href="mailto:Paul.Zimmermann@inria.fr">Paul.Zimmermann@inria.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> Dear Hans,<br>
<br>
> Pretty much the rest of the committee preferred the simplest possible<br>
> library solution, i.e. free functions that operate directly on float and<br>
> double, with an explicit rounding mode argument. I plan to write that up. I<br>
> would expect such a solution to be C compatible, if there is interest.<br>
<br>
this would be incompatible with the large effort currently done in the<br>
CORE-MATH project, which builds upon the ISO C standard for using rounding<br>
in mathematical functions:<br>
<br>
double x, y;<br>
fesetround (FE_TOWARDZERO);<br>
y = sin (x); /* or y = cr_sin(x) */<br>
<br>
You write-up should explain how to avoid throwing away this work<br>
(without loosing cycles).<br>
<br>
Best regards,<br>
Paul<br>
<br>
PS: if you only plan to suggest modifications in the C++ standard (not the<br>
C standard), please ignore this message.<br>
</blockquote></div>