tech-userlevel archive

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

Re: Update on mathlib gSoC project

2010/8/18 Stathis Kamperis <>:
> 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
>        fuzzing
>        edge case tests
>        proper floating-point exception generation and errno updates
>        self-tests
> * 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
> __________________________________________________
> [1]
> [2]
> [3]
> [4]
> [5]
> [6] Joerg Sonnenberg
> [7] Aleksej Saushev
> [8] pun intended with nextafter(3) :)

Hi all :)
This is a small follow up.

1. fenv.h implementation for sparc64 has been committed.
(Thanks to christos@ for committing it, martin@ for providing sparc
h/w to test and the rest of people that handled any fallout from the

2. New libm functions committed: remquo{,f}().

3. Test suite runs on Mac OSX now.
(It's actually quite important to make it run in diverse environments,
as that helps spot and eliminate broken tests.)

4. Test suite has been rebased on top of ATF 0.12.

5. Many false positive tests have been fixed. A couple of new test
programs been written along with a dozen of new test cases.

6. had an incident with passwords being sniffed and some of its
services are down. Therefore, is outdated. I now
host my site on:

Best regards,
Stathis Kamperis

Home | Main Index | Thread Index | Old Index