summaryrefslogtreecommitdiff
path: root/klm/util/double-conversion/strtod.cc
diff options
context:
space:
mode:
authorPatrick Simianer <simianer@cl.uni-heidelberg.de>2013-03-03 12:06:43 +0100
committerPatrick Simianer <simianer@cl.uni-heidelberg.de>2013-03-03 12:06:43 +0100
commit6b172ef1b1651e6ccf016b26c9ea94fad6df3152 (patch)
treea62dffda9143a619531be9f96912938659d3a890 /klm/util/double-conversion/strtod.cc
parent349ee7d5599bb973506c8bbb56926cf9d366b564 (diff)
parent7deec52e8feb1c908a91224f308e8cbd9a170576 (diff)
Merge branch 'master' of github.com:pks/cdec-dtrain
Diffstat (limited to 'klm/util/double-conversion/strtod.cc')
-rw-r--r--klm/util/double-conversion/strtod.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/klm/util/double-conversion/strtod.cc b/klm/util/double-conversion/strtod.cc
index 9758989f..e298766a 100644
--- a/klm/util/double-conversion/strtod.cc
+++ b/klm/util/double-conversion/strtod.cc
@@ -506,7 +506,9 @@ float Strtof(Vector<const char> buffer, int exponent) {
double double_previous = Double(double_guess).PreviousDouble();
float f1 = static_cast<float>(double_previous);
+#ifndef NDEBUG
float f2 = float_guess;
+#endif
float f3 = static_cast<float>(double_next);
float f4;
if (is_correct) {
@@ -515,7 +517,9 @@ float Strtof(Vector<const char> buffer, int exponent) {
double double_next2 = Double(double_next).NextDouble();
f4 = static_cast<float>(double_next2);
}
+#ifndef NDEBUG
ASSERT(f1 <= f2 && f2 <= f3 && f3 <= f4);
+#endif
// If the guess doesn't lie near a single-precision boundary we can simply
// return its float-value.