NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Update on mathlib gSoC project

Hi everyone,

this is a short summary of what we achieved in Google Summer of Code project:
"Audit, unit testing and improvements of the NetBSD math library".

* A comprehensive test suite[1] with 80 test programs and 260 test cases.
  Audited interfaces are:
          math.h, fenv.h, float.h, complex.h and tgmath.h
  Tests include:
        comparison with known-to-be-good results
        edge case tests
        proper floating-point exception generation and errno updates
* Automated html reports of test suite runs [2]

* fenv.h support for amd64 and i386 committed already [3]
* fenv.h support for sparc64 is ready, but needs h/w to be tested
* fenv.h support for m68k is in early WIP state

* A utility that allows us to measure the error of libm functions in
terms of ULPs[4]. The purpose of it is triple:
  Standard requires us to document our precision (no matter what that is).
  Audit *BSD libm implementations and tag good functions as candidates
for porting them to NetBSD
  Audit the functions that we implement from scratch
The utility can operate on double real, long double real, double
complex and long double complex functions.

* A utility to profile double real and double complex functions [5]
* A utility to profile fenv-related functions

* New functions or functions rewritten to not rely on gcc-specific features:
  creal, crealf, creall,
  cimag, cimagf, cimagl,
  conj, conjf, conjl,
  cproj, cprojf, cprojl,
  copysignl, fabsl, nextafterl, nexttoward

* A utility to re|generate C arrays with good data to plug into our tests

* Our work had a positive impact, as a side effect, on the following areas:
  Port of path64 compiler in NetBSD [6]
  Port of lush shell in NetBSD [7]
  We found a bug in mpfr library, that we reported upstream and got it fixed
  We found quite a few bugs in mpc library, that we reported upstream
and expect them to be fixed
  mpfr has been updated to latest version[7], mpc has been imported to pkgsrc[7]

What comes next -- NetBSD Autumn of Code:
* Cleanup, test and pursuit commit of currently available code (fenv.h
for sparc64, long double functions)
* Fix failing test cases (or fix bogus/false positive tests)
* Document our precision

What comes nextafter [8] -- NetBSD Winter of Code:
* Keep adding fenv.h support for all architectures that have h/w support
* Keep adding missing long double functions
* Figure out a way to somehow integrate the test suite with official
NetBSD source tree
* Provide h/w accelerated versions of mathematical functions, where possible

The entire project is a WIP. There are known issues, but also a strong
intention to have them addressed. More information can be found here:

Anyone wishing to work on any area that I mentioned is very welcome to
do so. I'm not feeling possessive about it. Just drop me a note to
avoid duplication :)

Many thanks to my co|mentor(s) Martin Husemann, Julio Merino, Joerg
Sonnenberg. Also, thanks to Matthias Drochner and last but not least
Aleksej Saushev.

Best regards,
Stathis Kamperis

[6] Joerg Sonnenberg
[7] Aleksej Saushev
[8] pun intended with nextafter(3) :)

Home | Main Index | Thread Index | Old Index