Chris Uppal wrote:
> Rui Maciel wrote:
>
>> And let's not forget about the ever elusive 80-bit extended precision
>> floating point format, also known as "why bother".
>
> For one answer, people might like to read:
>
>
http://www.cs.berkeley.edu/~wkahan/Stnfrd50.pdf
It appears that this text omits some important details which weight
significantly on this issue. For example, in the text's part 2, where the
author refers to discretized elliptic boundary-value problems, it is said:
«(...) For many reasons not necessarily spawned by roundoff, the solution u
has to be computed by an iteration, and that always entails the computation
of a residual
r := b – (A + Diag(q))·u
The final accuracy of the computed u is limited by the accuracy with which
the residual r can be computed. The accuracy of u , which is typically a
potential, has to be sufficient to support differencing to estimate the
Gradient Grad U(x), a field strength, without too much loss of accuracy to
cancellation.»
What must be taken under consideration in this regard is that the
coefficients of A, q and b tend to assume the form of integral expressions,
whose values are generally obtained by employing quadrature and cubature
rules.
The problem with this approach is that, in general, these
quadrature/cubature rules were developed so that their result is only exact
if they are used to integrate functions of a specific type. For example, a
popular choise, the set of Gauss-Legendre quadrature rules, were devised to
return the exact value of an integral if and only if the integrand function
is a polynomial up to a certain degree. When these quadrature rules are
employed to integrate functions other than the one they actually can
integrate, which is what happens in practice, they only return approximate
results.
In other words, in this example, Matrix A and vectors q and b generally are
themselves the result of an approximate calculation, and their error isn't
small. To put things in perspective, It's not uncommon for these errors to
be in the 1%-0.1% range. In some commercial number crunching applications
that implement this class of methods, the error even goes up to 3%-4% in
come applications.
Meanwhile, discussing whether floats or doubles should be used is equivalent
to discussing the significance of an error in the range of 0.0001%-0.00001%.
Hence, why bother?
To add insult to injury, discretized elliptic boundary-value problems only
provide approximate solutions, unless we are dealing with a very specific
problem. This means that if somehow it was possible to run all floating
point operations without introducing any rounding error or any precision
degradation, the end result would always be an approximate solution, not the
exact one.
So, although it might be nice to have heaps of precision at our disposal and
a profound knowledge on how to leverage the existing tools to minimize this
type of errors, spending time on this type of optimization, considering the
returns that can be had from that investment, represents a complete waste of
time.
Rui Maciel