if (n == 0) {
// Equation 44 of https://arxiv.org/pdf/0911.4796.pdf
- // Fourier Transform of the Stretched Exponential Function: Analytic Error Bounds,
- // Double Exponential Transform, and Open-Source Implementation,
- // Joachim Wuttke,
- // The C library libkww provides functions to compute the Kohlrausch-Williams-Watts function,
- // the Laplace-Fourier transform of the stretched (or compressed) exponential function exp(-t^beta)
- // for exponent beta between 0.1 and 1.9 with sixteen decimal digits accuracy.
+ // Fourier Transform of the Stretched Exponential Function: Analytic Error Bounds,
+ // Double Exponential Transform, and Open-Source Implementation,
+ // Joachim Wuttke,
+ // The C library libkww provides functions to compute the Kohlrausch-Williams-Watts function,
+ // the Laplace-Fourier transform of the stretched (or compressed) exponential function exp(-t^beta)
+ // for exponent beta between 0.1 and 1.9 with sixteen decimal digits accuracy.
Real eta_prime_0 = Real(2) + alpha + Real(1)/Real(4);
Real node = pi<Real>()/(eta_prime_0*h);
Real phi_prime = -(expm1_meta + x*exp_meta*eta_prime)/(expm1_meta*expm1_meta);
// Takuya Ooura and Masatake Mori,
- // Journal of Computational and Applied Mathematics, 112 (1999) 229-241.
- // A robust double exponential formula for Fourier-type integrals.
- // Equation 4.6
+ // Journal of Computational and Applied Mathematics, 112 (1999) 229-241.
+ // A robust double exponential formula for Fourier-type integrals.
+ // Equation 4.6
Real s = pi<Real>();
Real arg;
if (eta < -1) {
public:
ooura_fourier_sin_detail(const Real relative_error_goal, size_t levels) {
#ifdef BOOST_MATH_INSTRUMENT_OOURA
- std::cout << "ooura_fourier_sin with relative error goal " << relative_error_goal
- << " & " << levels << " levels." << std::endl;
+ std::cout << "ooura_fourier_sin with relative error goal " << relative_error_goal
+ << " & " << levels << " levels." << std::endl;
#endif // BOOST_MATH_INSTRUMENT_OOURA
if (relative_error_goal < std::numeric_limits<Real>::epsilon() * 2) {
throw std::domain_error("The relative error goal cannot be smaller than the unit roundoff.");
print_ooura_estimate(i, I0, I1, omega);
#endif
Real absolute_error_estimate = abs(I0-I1);
- Real scale = max(abs(I0), abs(I1));
+ Real scale = (max)(abs(I0), abs(I1));
if (!isnan(I1) && absolute_error_estimate <= rel_err_goal_*scale) {
- starting_level_ = max(long(i) - 1, long(0));
+ starting_level_ = (max)(long(i) - 1, long(0));
return {I0/omega, absolute_error_estimate/scale};
}
I1 = I0;
}
Real I0 = estimate_integral(f, omega, ii);
Real absolute_error_estimate = abs(I0-I1);
- Real scale = max(abs(I0), abs(I1));
+ Real scale = (max)(abs(I0), abs(I1));
#ifdef BOOST_MATH_INSTRUMENT_OOURA
print_ooura_estimate(ii, I0, I1, omega);
#endif
if (absolute_error_estimate <= rel_err_goal_*scale) {
- starting_level_ = max(long(ii) - 1, long(0));
+ starting_level_ = (max)(long(ii) - 1, long(0));
return {I0/omega, absolute_error_estimate/scale};
}
I1 = I0;
public:
ooura_fourier_cos_detail(const Real relative_error_goal, size_t levels) {
#ifdef BOOST_MATH_INSTRUMENT_OOURA
- std::cout << "ooura_fourier_cos with relative error goal " << relative_error_goal
- << " & " << levels << " levels." << std::endl;
- std::cout << "epsilon for type = " << std::numeric_limits<Real>::epsilon() << std::endl;
+ std::cout << "ooura_fourier_cos with relative error goal " << relative_error_goal
+ << " & " << levels << " levels." << std::endl;
+ std::cout << "epsilon for type = " << std::numeric_limits<Real>::epsilon() << std::endl;
#endif // BOOST_MATH_INSTRUMENT_OOURA
if (relative_error_goal < std::numeric_limits<Real>::epsilon() * 2) {
throw std::domain_error("The relative error goal cannot be smaller than the unit roundoff!");
print_ooura_estimate(i, I0, I1, omega);
#endif
absolute_error_estimate = abs(I0-I1);
- scale = max(abs(I0), abs(I1));
+ scale = (max)(abs(I0), abs(I1));
if (!isnan(I1) && absolute_error_estimate <= rel_err_goal_*scale) {
- starting_level_ = max(long(i) - 1, long(0));
+ starting_level_ = (max)(long(i) - 1, long(0));
return {I0/omega, absolute_error_estimate/scale};
}
I1 = I0;
print_ooura_estimate(ii, I0, I1, omega);
#endif
absolute_error_estimate = abs(I0-I1);
- scale = max(abs(I0), abs(I1));
+ scale = (max)(abs(I0), abs(I1));
if (absolute_error_estimate <= rel_err_goal_*scale) {
- starting_level_ = max(long(ii) - 1, long(0));
+ starting_level_ = (max)(long(ii) - 1, long(0));
return {I0/omega, absolute_error_estimate/scale};
}
I1 = I0;