![]() ![]() The strange thing is that the repo contains both the GPL and LGPL license documents (missed the latter). ![]() Having gone to the trouble of wrapping it, it made sense to release it separately for example, it could be used to test the quality of the OpenLibm functions.ĬRlibm is distributed under the GNU Lesser General Public License (LGPL). It is required for our interval arithmetic library, ValidatedNumerics. The CRlibm library is state-of-the-art as regards correctly-rounded functions of Float64 arguments. (Is that right?)Īs an aside, I see Julia also has a wrapper for crlibm ( GitHub - JuliaIntervals/CRlibm.jl: Correctly-rounded mathematical functions for Julia) I guess this is also a good thing, since it should not entail any SWIP source changes to move to OpenLibm - just a library replacement. So the current assumptions made about the underlying math library would continue to be in effect. However it doesn’t claim to be provably correct under all rounding modes as crlibm is. The fact that Julia uses and supports it is a definite plus. Provided there are no build or licensing issues, this would appear to provide SWIP with a consistent, platform independent arithmetic library obviously a good thing. It seems to be a standard package in Ubuntu as well as Macports and uses a BSD license.Ī search for crlibm alternatives finds, quoting: This project is maintained by the Julia Project It can be used standalone in applications and programming language implementations. OpenLibm is an effort to have a high quality, portable, standalone C mathematical library ( libm). A search for crlibm alternatives finds, quoting: This implies we need to live with it, use another compiler or help the MinGW fix their math library. So far, only the MinGW library seems poor. We could use crlibm to do the type of testing is performing to validate the C runtime library. So, if we want really correct rounding we need to find another library or stick with your trick assuming the result is correctly rounded within 1 ulp and then step one up/down depending on the rounding mode being up or down. That makes it usable only as an optional install for people building from sources as (effectively) changing changing SWI-Prolog to GPL is a no go. I found crlibm again, and recall the main issue: it is GPL, not LGPL. Largely that seems to be true, but rigorous testing is hard and there are no guarantees. The underlying assumption is that compiled arithmetic is IEEE compliant for all rounding modes and the functions in math libraries are correct within 1 ulp in default “to_nearest” rounding mode. What I care about is that the float rounding modes correctly bound any precise real values. I strongly suspect very few people care.Otherwise, there would be correct, precise C math libraries in common usage. ![]()
0 Comments
Leave a Reply. |