MPFR-based correctness testing for Mojo 🔥

This project is a proof of concept (PoC) that demonstrates how we can use the MPFR library as a “gold standard” to test the correctness of mathematical functions implemented in Mojo. MPFR is an efficient C library for multiple-precision floating-point computations with correct rounding. It is used to test numerical routines in projects such as CORE-MATH, LLVM-libc, and RLIBM. By comparing the outputs of our custom Mojo functions with MPFR, we can ensure that our implementations are correctly rounded or at least as accurate as possible within specific memory or latency requirements. Main Features: - Provides a routine to convert MPFR values into lower-precision floating-point types (like float16 and bfloat16), avoiding double rounding errors. - Supports correctness testing under multiple IEEE 754 rounding modes. - Includes utilities to change and check rounding mode at runtime. Project Repository 🔗 github.com/leandrolcampos/mpfr-for-mojo
GitHub
GitHub - leandrolcampos/mpfr-for-mojo: MPFR-based testing for Mojo ...
MPFR-based testing for Mojo 🔥. Contribute to leandrolcampos/mpfr-for-mojo development by creating an account on GitHub.
1 Reply
Robert
Robert•3d ago
This looks cool awesome work :mojonightly: đź‘Ś

Did you find this page helpful?