]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Explain.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 8 Apr 2005 21:49:05 +0000 (21:49 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 8 Apr 2005 21:49:05 +0000 (21:49 +0000)
git-svn-id: https://svn.dealii.org/trunk@10454 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/logstream.h

index f765e022ce7d93dd58dce69216466dd053be2ba8..bc34b2d05ac4b330d42e1cf108aae3f1b730cf40 100644 (file)
@@ -190,6 +190,39 @@ class LogStream
                                      * double values. All numbers
                                      * with a smaller absolute value
                                      * will be printed as zero.
+                                     *
+                                     * The default value for this
+                                     * threshold is zero,
+                                     * i.e. numbers are printed
+                                     * according to their real value.
+                                     *
+                                     * This feature is mostly useful
+                                     * for automated tests: there,
+                                     * one would like to reproduce
+                                     * the exact same solution in
+                                     * each run of a
+                                     * testsuite. However, subtle
+                                     * difference in processor,
+                                     * operating system, or compiler
+                                     * version can lead to
+                                     * differences in the last few
+                                     * digits of numbers, due to
+                                     * different rounding. While one
+                                     * can avoid trouble for most
+                                     * numbers when comparing with
+                                     * stored results by simply
+                                     * limiting the accuracy of
+                                     * output, this does not hold for
+                                     * numbers very close to zero,
+                                     * i.e. zero plus accumulated
+                                     * round-off. For these numbers,
+                                     * already the first digit is
+                                     * tainted by round-off. Using
+                                     * the present function, it is
+                                     * possible to eliminate this
+                                     * source of problems, by simply
+                                     * writing zero to the output in
+                                     * this case.
                                      */
     void threshold_double(const double t);
     

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.