File indexing completed on 2025-01-18 09:40:43
0001
0002
0003
0004
0005
0006 #ifndef BOOST_MATH_TOOLS_WORHAROUND_HPP
0007 #define BOOST_MATH_TOOLS_WORHAROUND_HPP
0008
0009 #ifdef _MSC_VER
0010 #pragma once
0011 #endif
0012
0013 #if (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__))
0014 # include <math.h>
0015 #endif
0016
0017 #include <boost/math/tools/config.hpp>
0018
0019 namespace boost{ namespace math{ namespace tools{
0020
0021
0022
0023
0024
0025 template <class T>
0026 inline T fmod_workaround(T a, T b) BOOST_MATH_NOEXCEPT(T)
0027 {
0028 BOOST_MATH_STD_USING
0029 return fmod(a, b);
0030 }
0031 #if (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)) && ((LDBL_MANT_DIG == 106) || (__LDBL_MANT_DIG__ == 106))
0032 template <>
0033 inline long double fmod_workaround(long double a, long double b) noexcept
0034 {
0035 return ::fmodl(a, b);
0036 }
0037 #endif
0038
0039 }}}
0040
0041 #endif
0042