diff options
author | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-08 16:44:20 +0000 |
---|---|---|
committer | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-08 16:44:20 +0000 |
commit | 337b647baac15609a0a493902d58c473d25d2ed8 (patch) | |
tree | 3827f59a180164878ee217f27f445c259c9e5bab /decoder/logval.h | |
parent | 7386574a2c70c7ed6e937eb94e3add8023cd7327 (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.h | 6 |
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_; } |