Hello, Jason.

You wrote 21 мая 2010 г., 3:48:03:

> A while ago someone talked about incorporating ALGLIB into Sage to 
> provide, among other things, multiprecision linear algebra.

It  was  me  :)  I  am  working on this issue. I expect that interface
between double precision ALGLIB and Python will be ready in 2-3 weeks,
with multiple precision interface following several weeks later.

> Does anyone have experience with mplapack?  How does it compare to
> ALGLIB in linear algebra (for algorithms that are implemented in both)?

I  haven't  benchmarked mplapack, but I can say something about it and
can compare it with ALGLIB:


== ALGORITHMS ========================================================

MPLAPACK  includes  all  LAPACK  algorithms,  especially  wide  set of
generalized EVD/SVD solver. Nothing beyond LAPACK is included.

ALGLIB  includes  subset  of  LAPACK:  real/complex/SPD/HPD triangular
factorizations,  inverses,  solvers;  real/complex/Hermitian EVD, real
SVD.  However,  it  also  includes  algorithms  beyond linear algebra:
numerical integration, interpolation/fitting, optimization, many other
algorithms   (including   those  which  won't  benefit  from  multiple
precision). 


== MULTIPLE PRECISION SUPPORT ========================================

MPLAPACK supports several multiple precision types:
* mpf_t (GMP)
* mpfr_t (MPFR)
* double-double and quad-double (DD/QD package)
* double (standard 64-bit floating point type)

However, only mpfr_t (and double) support is important. Other multiple
precision types are almost useless due to IEEE-nonconformance:
*   mpf_t   is  not  recommended  for  numerical  work  (it  leads  to
non-reproducible  results  and  have very odd rounding rules; even GMP
manual recommends to use MPFR)
*  DD/QD  may  look  attractive (very high performance for 106 and 212
bits  when compared with mpfr_t), but it is no good for numerical work
too    (except    for    BLAS    internals;    see    page    31    of
http://www.netlib.org/lapack/lawnspdf/lawn149.pdf  ).

ALGLIB supports mpfr_t and double.


== PROGRAMMING LANGUAGE ==============================================

MPLAPACK  is  written in C++ and uses C++ to handle multiple precision
types  like  built-in  floating  point  types  (i.e. it uses "a=b+c/d"
instead  of  directly calling MPFR functions). It leads to unnecessary
allocation  of  temporaries and some performance penalty (about 25-30%
for 128-bit precision).

Multiple precision ALGLIB 2.5.0 is written in C++ and suffers from the
same drawbacks. But what I develop for SAGE is a faster pure C library
which  caches  all  temporaries (it is really easy to develop - I just
have  to  modify  code  generator  which  is  used  to generate ALGLIB
source).


== OPTIMIZATIONS =====================================================

Both  packages  rely  on  highly optimized MPFR for multiple precision
computations.

As  for  double precision, ALGLIB uses better optimized linear algebra
code.


== MULTITHREADING ====================================================

Both project don't support multithreading yet. Both want to :)


== LICENSE ===========================================================

MPLAPACK is LGPL 3+, ALGLIB is GPL 2+.


-- 
With best regards,
 Sergey                          mailto:sergey.bochka...@alglib.net

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to