# float128 in linear algebra

Is there any paper or research concerning float128 arithmetics applied to linear algebra problems(e.g. iterative solvers, decompositions etc.)?
How much benefit is really there in comparison with double? How much slower is it?

I've discovered this toolbox: http://www.advanpix.com/ Unfortunately it is commercial, but results if they are true, look impressive.

• As far as I know, you would need an application with horrible conditioning to warrant the use of float128. I'm not sure if that helped..... – Inquest Mar 11 '12 at 13:44
• I guess any matrix that has condition number close to $\epsilon^{-1}$, where $\epsilon$ is the smallest significant floating point number can be better treated using more precise arithmetics. – Alexander Mar 11 '12 at 14:04
• Here, one could use sym() when declaring the matrix and have any precision but it is horribly slow. – Inquest Mar 11 '12 at 14:24

## 1 Answer

The quad-precision type __float128 is available in PETSc. Since most sparse linear algebra methods are limited by memory bandwidth instead of floating point performance, it is often only about half the speed of double precision. It is especially useful when using matrix-free finite differencing (frequently used with Jacobian-free Newton-Krylov methods) or exploring whether a nearly-singular operator is actually singular. For most problems, it is possible and preferable to use a well-scaled and conditioning-friendly discretization so that quad precision is not necessary for production runs.

• "exploring whether a nearly-singular operator is actually singular" :: Where would that happen? – Inquest Mar 11 '12 at 14:13
• How about degradation of convergence for iterative due to rounding off errors? For instance, trivial CG and loosing of conjugacy during solution can be less significant for float128. – Alexander Mar 11 '12 at 15:54
• @Nunoxic A common case is when your boundary conditions are not compatible (e.g. incorrect outflow conditions in the hyperbolic limit) or do not constrain a null space (too few points of contact in elasticity). Another is if you are trying to solve a steady-state problem that does not have a steady state or in which you find a local minimum. The inherent ill-conditioning could come from large jumps in material coefficients or very thin structures. – Jed Brown Mar 11 '12 at 16:02
• @Alexander Yes, that is true. It's actually common in engineering applications to use CG with full orthogonalization for that reason. Switching to quad precision saves memory and time (if you do enough iterations) by allowing the standard CG recurrence to be used. – Jed Brown Mar 11 '12 at 16:16
• @JedBrown, is there any comparison about that? How significant is this effect? – Alexander Mar 11 '12 at 16:31