Thread Links Date Links
Thread Prev Thread Next Thread Index Date Prev Date Next Date Index

Re: Announcing the Moore library for interval arithmetic



Oliver,

   Thanks for using the library and for the comparisons.
   
    I did not mean to "challenge" your implementation. By
"non comparable" I just meant to say that C++ is quite
different from Octave, in many respects. 

   For instance, in order to compare your library with mine
I would need to time different processes, using a 
wall clock. The comparisons with the libraries in
my article involved a single process, using a 
different kind of timer. 

  Both C++ and Octave are great tools, but they
have different purposes (and this is why it 
is hard to compare them)

   One the one hand,   as you mentioned, I would expect
 C++ to be much faster than Octave in the interpreted
parts of the code. On the other, Octave is much
better than C++ for prototyping for instance. It is
much more flexible. Moreover, your reliance on
Octave makes your library much more portable
than mine.

  In parts of the code depending on external libraries,
like MPFR and crmlib, the overhead caused by both
my library and yours is minimal, and the library
using the faster dependency will win. Therefore,
now that you use crmlib I do expect that your
library will be much faster for the elementary 
functions. 

   In any case, when revision time comes I 
will rewrite the part of the article that you mention
and try to express "comparable" in a different way.
I will also change the times for the asin and acos 
functions that you correctly pointed out to have 
problems. I will present the results of better 
experiments in this case. 

  Finally, I find it great that there are several
libraries, specially for testing the correctness
of the results. It is quite hard to implement this
kind of library without bugs, and the more
libraries by different people we have, the
greater the chance that bugs will be detected
and fixed. Even very slow libraries are quite
useful in this regard.

   regards,

                 walter.


 

On Wed, Dec 7, 2016 at 12:01 AM, Oliver Heimlich <oheim@xxxxxxxxx> wrote:
On 29.11.2016 11:06, Walter Mascarenhas wrote:
> Dear all,
>
>      I finally found the time to complete an interval arithmetic
> library in which I have been working for some time (by
> completing I mean having the code, a manual and
> about 1000 tests)
>
>     This message contains a copy of the manual and an
> article about the library. You can obtain the code by
> sending me an email message (I would like to estimate
> the size of the set of people which would ever look
> at it, to know if it is not empty for instance)
>
>   The library is open source, and I will send you
> the source code.

Hi Walter,

thanks for sending me the source code.  Regarding your article on p. 1,
“the other reference implementation is implemented in Octave and is not
comparable to our library”.

I'd like to say: “Challenge accepted” ;-)

I have migrated your benchmarks into Octave code (attached).  Evaluation
of the Lebesgue function is pretty slow because of the interpreter
overhead (on the other hand you don't have to wait while your code
compiles).  In my example I use only 20000 points for “t” and it already
takes more than five seconds.

Evaluation speed of Newton's method seems to be somewhere between P1788
and Filib.

Regarding elementary functions the Octave package currently is in the
league of P1788 and your library, because we mainly measure runtimes of
MPFR.  However, I have integrated the crlibm library for the upcoming
version.  Now, computation times for elementary functions are almost in
the league of Filib, better than Boost, and with tight enclosures of
binary64 precision.

Best
Oliver


Output of the Octave script on my Notebook (with crlibm used for
elementary functions):

--8<-----------------------------------------------

Lebesgue function  5.40116 sec

Newton's method on polynomials
deg 1   0.0215349 sec
deg 2   0.878694 sec
deg 3   0.99651 sec
deg 4   2.21467 sec
deg 5   2.08057 sec
deg 6   3.72349 sec
deg 7   5.37517 sec
deg 8   4.81427 sec
deg 9   7.88394 sec
deg 10   7.12032 sec

Elementary Functions
sin  0.278104 sec
cos  0.289208 sec
tan  0.21759 sec
asin 0.140792 sec
acos 0.143261 sec
atan 0.160316 sec
exp  0.0642691 sec
log  0.0479481 sec