From: wolf Date: Tue, 18 May 1999 13:15:13 +0000 (+0000) Subject: Allow for some comparisons to be wrong up to rounding error. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6c93155665028cf571fbd6dda9448f8ac714abae;p=dealii-svn.git Allow for some comparisons to be wrong up to rounding error. git-svn-id: https://svn.dealii.org/trunk@1341 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/numerics/histogram.cc b/deal.II/deal.II/source/numerics/histogram.cc index 66a2bdbb3c..5b7251b035 100644 --- a/deal.II/deal.II/source/numerics/histogram.cc +++ b/deal.II/deal.II/source/numerics/histogram.cc @@ -48,7 +48,7 @@ void Histogram::evaluate (const vector > &values, // first find minimum and maximum value // in the indicators - number min_value, max_value; + number min_value=0, max_value=0; switch (interval_spacing) { case linear: @@ -95,12 +95,13 @@ void Histogram::evaluate (const vector > &values, default: Assert (false, ExcInternalError()); }; - - Assert (max_value >= min_value, ExcInvalidData()); // move right bound arbitrarily if - // necessary - if (max_value == min_value) + // necessary. sometimes in logarithmic + // mode, max_value may be larger than + // min_value, but only up to rounding + // precision. + if (max_value <= min_value) max_value = min_value+1;