From fb216e18d1fbf3e60052d404105c1c7bac296c12 Mon Sep 17 00:00:00 2001 From: dehnert Date: Mon, 18 Apr 2016 21:14:31 +0200 Subject: [PATCH] fixed another issue in expression evaluation Former-commit-id: e28e1fdf2880a7a3bcbf5d5d7156879928ae316d --- src/storage/expressions/UnaryNumericalFunctionExpression.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/storage/expressions/UnaryNumericalFunctionExpression.cpp b/src/storage/expressions/UnaryNumericalFunctionExpression.cpp index dea7b3dff..fa7cad7e3 100644 --- a/src/storage/expressions/UnaryNumericalFunctionExpression.cpp +++ b/src/storage/expressions/UnaryNumericalFunctionExpression.cpp @@ -35,10 +35,10 @@ namespace storm { if (this->getOperatorType() == OperatorType::Minus) { STORM_LOG_THROW(this->getOperand()->hasIntegerType(), storm::exceptions::InvalidTypeException, "Unable to evaluate expression as integer."); - int_fast64_t result = this->getOperand()->evaluateAsInt(); + int_fast64_t result = this->getOperand()->evaluateAsInt(valuation); return -result; } else { - double result = this->getOperand()->evaluateAsDouble(); + double result = this->getOperand()->evaluateAsDouble(valuation); switch (this->getOperatorType()) { case OperatorType::Floor: return static_cast(std::floor(result)); break; case OperatorType::Ceil: return static_cast(std::ceil(result)); break;