Boost logo

Boost :

Subject: Re: [boost] Determining interest: Pure imaginary number library
From: Matthieu Schaller (matthieu.schaller_at_[hidden])
Date: 2011-11-25 04:35:52


Dear all,

My advice would be to boostify the code, write the documentation including
> as much performances tests as you consider could help to consider this
> library a should have.

I have modified the code to match the quality criterions, added a
comprehensive (doxygen) documentation and modified all the directories to
mimic the main trunk.

You can also find in the sources a test file which tests all operators and
functions for accuracy. It uses boost::test and shows that all functions
are accurate within 10e-12 (four doubles) when compared to the same
computation done with std::complex<>. When the result is not completely
identical, the imaginary<> class version is always closer to the analytical
result than the std::complex<> one.
The only exception is the tanh() function which differs from the
std::complex<> one by 1e-9 for numbers close to 0.

I have also added another example (computing the Julia fractal set in
mathematics) showing a ~5% gain in performance. The speed-up in this case
is much less impressive but the algorithm does not only use imaginary
numbers.

I could also provide an example which brutally compares the speed of some
functions and operators but I prefer presenting real applications rather
than artificially improved codes.

Is there something that could obviously be improved ?

Is there some interest in pushing this further ?

Regards,

Matthieu Schaller


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk