summaryrefslogtreecommitdiff
path: root/decoder/logval.h
diff options
context:
space:
mode:
authorgraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-08 16:44:20 +0000
committergraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-08 16:44:20 +0000
commitd5ff16caf653f6fab31a3f0620214c331d6eebc4 (patch)
tree696c66cc1a217564cb08ce947047ccc2f1092b1f /decoder/logval.h
parentcea8791b9c517a1ab7e29c34fa6bf52843a3ab55 (diff)
--show_features
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@184 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/logval.h')
-rw-r--r--decoder/logval.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/decoder/logval.h b/decoder/logval.h
index 457818e7..9aaba557 100644
--- a/decoder/logval.h
+++ b/decoder/logval.h
@@ -1,7 +1,7 @@
#ifndef LOGVAL_H_
#define LOGVAL_H_
-#define LOGVAL_CHECK_NEG_POW false
+#define LOGVAL_CHECK_NEG false
#include <iostream>
#include <cstdlib>
@@ -59,7 +59,7 @@ class LogVal {
}
LogVal& poweq(const T& power) {
-#if LOGVAL_CHECK_NEG_POW
+#if LOGVAL_CHECK_NEG
if (s_) {
std::cerr << "poweq(T) not implemented when s_ is true\n";
std::abort();
@@ -116,7 +116,9 @@ LogVal<T> operator-(LogVal<T> o1, const LogVal<T>& o2) {
template<typename T>
T log(const LogVal<T>& o) {
+#ifdef LOGVAL_CHECK_NEG
if (o.s_) return log(-1.0);
+#endif
return o.v_;
}