Background:<p>Floating-point numbers form a finite set. It is thus impossible for them to represent all real numbers. The <i>correct rounding</i> of a real number x is the unique floating point number that is closest to x, according to a user-chosen definition of "closest" (possibly always rounding up or down, and including precise rules for ties). IEEE-754 is the standard for floating-point maths, followed by most programming languages. It mandates correct rounding for elementary operations (+, -, ×, ÷), but not for transcendental functions (exp, log, sin, cos,...), or at least that is the situation in practice now (the truth is a bit more subtle, see Q3 in FAQ link below). Correct rounding for transcendental functions was generally thought to require arbitrary precision arithmetic and hence to be prohibitively expensive. Still, if performance is not the priority, it is attainable (the MPFR library does it, and at arbitrary precisions, not just 32 and 64 bits).<p>The main practical advantage of correct rounding is the uniqueness of the return value for math functions (for every input, there is at most one possible correct output). For debugging, it is amazing to have bit-for-bit reproducibility across builds, compilers, hardware and platforms. With incorrect rounding, instead, every implementation does it differently, and we lose reproducibility across platforms. Worse, every time the maths library (e.g. libc/libm) is updated (say, fixing a performance bug in a corner case), we can also get slightly different answers.<p>Recently, there has been a renewed push for fast correctly-rounded transcendental functions (see, e.g., RLIBM and CRLIBM). Verifying correctness is fairly straightforward for 32-bit float functions with one argument, because we can perform complete enumeration over inputs, then check outputs with MPFR. Proofs for correctly-rounded 64-bit float functions can be much more involved.<p>CORE-MATH is an attempt to create a repository of math functions that are<p>- open-source and permissively-licensed<p>- correctly-rounded<p>- fast enough to be a drop-in replacement for standard library functions<p>- API-compatible with standard library functions (wrt. rounding modes in particular)<p>- at various bit widths, mostly 32 for now, but also 64, 80 and 128 bits.<p>Crucially, CORE-MATH is <i>not</i> a library. Their objective is explicitly to get the code from the repository included into other libraries. Their long-term objective (see abstract in paper link below) is to get to a point where <i>fast</i> correctly-rounded implementations are available for all transcendental functions. Then, the IEEE-754 standard committee could consider <i>mandating</i> correct rounding for <i>everything</i> in the next revision of the standard.<p>Paper: <a href="https://hal.inria.fr/hal-03721525/" rel="nofollow">https://hal.inria.fr/hal-03721525/</a><p>Gitlab: <a href="https://gitlab.inria.fr/core-math/core-math" rel="nofollow">https://gitlab.inria.fr/core-math/core-math</a><p>FAQ: <a href="https://core-math.gitlabpages.inria.fr/faq.html" rel="nofollow">https://core-math.gitlabpages.inria.fr/faq.html</a>