diff --git a/resources/3rdparty/sylvan/CMakeLists.txt b/resources/3rdparty/sylvan/CMakeLists.txt index 27762655b..d9999a0f3 100644 --- a/resources/3rdparty/sylvan/CMakeLists.txt +++ b/resources/3rdparty/sylvan/CMakeLists.txt @@ -2,8 +2,8 @@ cmake_minimum_required(VERSION 2.6) project(sylvan C CXX) enable_testing() -set(CMAKE_C_FLAGS "-O3 -Wextra -Wall -Werror -fno-strict-aliasing -std=gnu11") -set(CMAKE_CXX_FLAGS "-O3 -Wextra -Wall -Werror -fno-strict-aliasing -Wno-deprecated-register -std=gnu++11") +set(CMAKE_C_FLAGS "-O3 -Wextra -Wall -Werror -fno-strict-aliasing -std=gnu11 -fPIC") +set(CMAKE_CXX_FLAGS "-O3 -Wextra -Wall -Werror -fno-strict-aliasing -Wno-deprecated-register -std=gnu++11 -fPIC") option(WITH_COVERAGE "Add generation of test coverage" OFF) if(WITH_COVERAGE) diff --git a/src/generator/VariableInformation.cpp b/src/generator/VariableInformation.cpp index a5be93a6e..42f924beb 100644 --- a/src/generator/VariableInformation.cpp +++ b/src/generator/VariableInformation.cpp @@ -3,6 +3,8 @@ #include "src/utility/macros.h" #include "src/exceptions/InvalidArgumentException.h" +#include <cmath> + namespace storm { namespace generator { @@ -74,4 +76,4 @@ namespace storm { } } -} \ No newline at end of file +} diff --git a/src/solver/GlpkLpSolver.cpp b/src/solver/GlpkLpSolver.cpp index bcf296865..bc7d72a00 100644 --- a/src/solver/GlpkLpSolver.cpp +++ b/src/solver/GlpkLpSolver.cpp @@ -17,6 +17,9 @@ #include "src/settings/modules/DebugSettings.h" #include "src/settings/modules/GlpkSettings.h" + +#include <cmath> + namespace storm { namespace solver { GlpkLpSolver::GlpkLpSolver(std::string const& name, OptimizationDirection const& optDir) : LpSolver(optDir), lp(nullptr), variableToIndexMap(), nextVariableIndex(1), nextConstraintIndex(1), modelContainsIntegerVariables(false), isInfeasibleFlag(false), isUnboundedFlag(false), rowIndices(), columnIndices(), coefficientValues() { @@ -298,7 +301,7 @@ namespace storm { } // Now check the desired precision was actually achieved. - STORM_LOG_THROW(std::abs(static_cast<int>(value) - value) <= storm::settings::getModule<storm::settings::modules::GlpkSettings>().getIntegerTolerance(), storm::exceptions::InvalidStateException, "Illegal value for integer variable in glpk solution (" << value << ")."); + STORM_LOG_THROW(std::fabs(static_cast<int>(value) - value) <= storm::settings::getModule<storm::settings::modules::GlpkSettings>().getIntegerTolerance(), storm::exceptions::InvalidStateException, "Illegal value for integer variable in glpk solution (" << value << ")."); return static_cast<int_fast64_t>(value); } @@ -320,7 +323,7 @@ namespace storm { value = glp_get_col_prim(this->lp, static_cast<int>(variableIndexPair->second)); } - STORM_LOG_THROW(std::abs(static_cast<int>(value) - value) <= storm::settings::getModule<storm::settings::modules::GlpkSettings>().getIntegerTolerance(), storm::exceptions::InvalidStateException, "Illegal value for binary variable in glpk solution (" << value << ")."); + STORM_LOG_THROW(std::fabs(static_cast<int>(value) - value) <= storm::settings::getModule<storm::settings::modules::GlpkSettings>().getIntegerTolerance(), storm::exceptions::InvalidStateException, "Illegal value for binary variable in glpk solution (" << value << ")."); return static_cast<bool>(value); } @@ -349,4 +352,4 @@ namespace storm { } } -#endif \ No newline at end of file +#endif diff --git a/src/storage/dd/DdManager.cpp b/src/storage/dd/DdManager.cpp index 9281a0a33..3bb40b7db 100644 --- a/src/storage/dd/DdManager.cpp +++ b/src/storage/dd/DdManager.cpp @@ -6,6 +6,8 @@ #include "src/utility/constants.h" #include "src/exceptions/InvalidArgumentException.h" +#include <cmath> + namespace storm { namespace dd { template<DdType LibraryType> @@ -349,4 +351,4 @@ namespace storm { template Add<DdType::Sylvan, double> DdManager<DdType::Sylvan>::getIdentity(storm::expressions::Variable const& variable) const; template Add<DdType::Sylvan, uint_fast64_t> DdManager<DdType::Sylvan>::getIdentity(storm::expressions::Variable const& variable) const; } -} \ No newline at end of file +} diff --git a/src/storage/dd/cudd/CuddAddIterator.cpp b/src/storage/dd/cudd/CuddAddIterator.cpp index e11b75aec..379a0ff22 100644 --- a/src/storage/dd/cudd/CuddAddIterator.cpp +++ b/src/storage/dd/cudd/CuddAddIterator.cpp @@ -4,6 +4,8 @@ #include "src/utility/macros.h" #include "src/storage/expressions/ExpressionManager.h" +#include <cmath> + namespace storm { namespace dd { template<typename ValueType> @@ -184,4 +186,4 @@ namespace storm { template class AddIterator<DdType::CUDD, double>; template class AddIterator<DdType::CUDD, uint_fast64_t>; } -} \ No newline at end of file +} diff --git a/src/storage/dd/sylvan/SylvanAddIterator.cpp b/src/storage/dd/sylvan/SylvanAddIterator.cpp index 4322aa1b6..8c97941a3 100644 --- a/src/storage/dd/sylvan/SylvanAddIterator.cpp +++ b/src/storage/dd/sylvan/SylvanAddIterator.cpp @@ -8,6 +8,8 @@ #include "src/utility/macros.h" #include "src/exceptions/NotImplementedException.h" +#include <cmath> + namespace storm { namespace dd { template<typename ValueType> @@ -186,4 +188,4 @@ namespace storm { template class AddIterator<DdType::Sylvan, double>; template class AddIterator<DdType::Sylvan, uint_fast64_t>; } -} \ No newline at end of file +}