From 10cc8c3a75f8b0070a19ee2be32ee8974001496d Mon Sep 17 00:00:00 2001 From: "Christoph M. Wintersteiger" Date: Wed, 27 Apr 2016 20:15:22 +0100 Subject: [PATCH] Build fix for VS2012 and earlier. --- src/util/hwf.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/util/hwf.cpp b/src/util/hwf.cpp index a990e6e6d..8c10e3170 100644 --- a/src/util/hwf.cpp +++ b/src/util/hwf.cpp @@ -383,7 +383,13 @@ void hwf_manager::round_to_integral(mpf_rounding_mode rm, hwf const & x, hwf & o } void hwf_manager::rem(hwf const & x, hwf const & y, hwf & o) { +#if defined(_WINDOWS) && _MSC_VER < 1800 + o.value = fmod(x.value, y.value); + if (o.value >= (y.value/2)) + o.value /= 2.0; +#else o.value = remainder(x.value, y.value); +#endif #if 0 // Here is an x87 alternative if the above makes problems; this may also be faster.