From 7fc9c84573642e7993457ed73b37747a3eaba8bc Mon Sep 17 00:00:00 2001 From: graehl Date: Fri, 16 Jul 2010 01:56:34 +0000 Subject: oracle directions git-svn-id: https://ws10smt.googlecode.com/svn/trunk@276 ec762483-ff6d-05da-a07a-a48fb63a330f --- decoder/logval.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'decoder/logval.h') diff --git a/decoder/logval.h b/decoder/logval.h index 9aaba557..c8c342a3 100644 --- a/decoder/logval.h +++ b/decoder/logval.h @@ -58,6 +58,12 @@ class LogVal { return *this += b; } + // LogVal(fabs(log(x)),x.s_) + friend LogVal abslog(LogVal x) { + if (x.v_<0) x.v_=-x.v_; + return x; + } + LogVal& poweq(const T& power) { #if LOGVAL_CHECK_NEG if (s_) { -- cgit v1.2.3