Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
7a6efab
First draft of promotion
mborland Apr 24, 2023
5dcf5a9
Test beta dist for F64, F32, and F16
mborland Apr 24, 2023
4c753c2
Reverse 128bits and prefer F64 over long double when it's 64bits
mborland Apr 25, 2023
2f0b0ed
Add more testing
mborland Apr 25, 2023
bc79263
Add compile tests for F32 and F64
mborland May 2, 2023
2b1d5b6
Cast assignment of promoted type
mborland May 2, 2023
be37704
Explicit casting of promoted types
mborland May 2, 2023
5d044d5
Remove cast for output iterator
mborland May 9, 2023
6a3a89b
Add testing to quadrature
mborland May 11, 2023
3c2a04e
Add gcc-13 to drone config
mborland May 11, 2023
ac4605b
Fix Minw-64 C++23 compile failures.
jzmaddock May 13, 2023
b3f361c
Fix the promote_args<float32_t, float32_t> case.
jzmaddock May 14, 2023
58264c0
Add test case for promote_args.
jzmaddock May 14, 2023
c5b4d28
Suppress lots of warnings for std::float32_t.
jzmaddock May 15, 2023
ac8765b
Update drone to use Ubuntu 23.04 for g++13
mborland May 15, 2023
fa8a83f
Enable testing of new floats
mborland May 15, 2023
d217813
Fix stack overflow on test_finite_singular_boundary with _Float64
mborland May 16, 2023
8433636
Fix remaining warnings from float32.cpp.
jzmaddock May 16, 2023
6104363
Add float128 testing
mborland May 16, 2023
5045047
Use charconv instead of streaming operator for std::float128_t
mborland May 16, 2023
0c1920b
Move macro definitions to config
mborland May 16, 2023
a0360d8
Use charconv in convert_from_string for arithmetic types
mborland May 16, 2023
edf6597
inline template specialization
mborland May 16, 2023
55eaf05
Add additional conversion function for C++23 types
mborland May 16, 2023
00facdc
Fix cardinal cubic b spline for std::float32_t
mborland May 17, 2023
f86ea8e
Begin adding interpolator tests
mborland May 17, 2023
41be4fb
Improve to/from_chars configuration.
jzmaddock May 21, 2023
51d7011
Fix formatting and missing header
mborland May 22, 2023
c4c8c69
Add wavelet transform test with additional casts
mborland May 22, 2023
aef5713
Add rsqrt test and update type traits for control path
mborland May 22, 2023
ca31dcf
Add AGM test
mborland May 22, 2023
faaf475
Fix stack overflow in cohen acceleration from GCC bug
mborland May 22, 2023
ebcc430
Add casting to whittaker shannon for conversion rank errors
mborland May 22, 2023
d1bd7b6
Add casting and tests
mborland May 22, 2023
823fcd4
Add test and cast to finite differences
mborland May 30, 2023
c249bfe
Fix -Wreturn-type
mborland May 30, 2023
6d37555
Collected autodiff fixes
mborland May 30, 2023
ae56ab2
Fix conversion errors in digamma
mborland May 31, 2023
7a66a98
Fix for autodiff 3
mborland May 31, 2023
b66264f
Collected special functions warning fixes
mborland May 31, 2023
a7f98db
Add casts to all two argument cmath functions to work around GCC bug
mborland May 31, 2023
ff1a265
Add to test_constants
mborland May 31, 2023
a6bc6c7
Add <stdfloat> constructor to real_concept
mborland Jun 5, 2023
bc9d4b1
Fix failures and warnings in test_autodiff_6
mborland Jun 5, 2023
677f3b6
Collected fixes for test_autodiff_8
mborland Jun 5, 2023
7a0e8e0
More casting of pow
mborland Jun 16, 2023
37df734
Add integer exponent function to chebyshev detail
mborland Jun 16, 2023
0117f4a
Fix multiprecision concept failure
mborland Jun 16, 2023
ef423e8
Restore drone config
mborland Jun 16, 2023
e62a284
Fix multiprecision failures
mborland Jun 19, 2023
b57749d
Fix casting errors
mborland Jun 20, 2023
0a014fd
Fix for expression template use in chebyshev.hpp.
jzmaddock Jun 21, 2023
851b357
Fix pessimization on unaffected platforms
mborland Jun 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Collected fixes for test_autodiff_8
[ci skip]
  • Loading branch information
mborland committed Jun 5, 2023
commit 677f3b65829607d19bcdb5ae14cf3f54d3a8f7f6
12 changes: 6 additions & 6 deletions include/boost/math/special_functions/erf.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ T erf_imp(T z, bool invert, const Policy& pol, const std::integral_constant<int,
{
if(!invert)
return -erf_imp(T(-z), invert, pol, t);
else if(z < -0.5)
else if(z < T(-0.5))
return 2 - erf_imp(T(-z), invert, pol, t);
else
return 1 + erf_imp(T(-z), false, pol, t);
Expand All @@ -217,12 +217,12 @@ T erf_imp(T z, bool invert, const Policy& pol, const std::integral_constant<int,
// which implementation to use,
// try to put most likely options first:
//
if(z < 0.5)
if(z < T(0.5))
{
//
// We're going to calculate erf:
//
if(z < 1e-10)
if(z < T(1e-10))
{
if(z == 0)
{
Expand Down Expand Up @@ -294,7 +294,7 @@ T erf_imp(T z, bool invert, const Policy& pol, const std::integral_constant<int,
BOOST_MATH_INSTRUMENT_VARIABLE(P[0]);
BOOST_MATH_INSTRUMENT_VARIABLE(Q[0]);
BOOST_MATH_INSTRUMENT_VARIABLE(z);
result = Y + tools::evaluate_polynomial(P, T(z - 0.5)) / tools::evaluate_polynomial(Q, T(z - 0.5));
result = Y + tools::evaluate_polynomial(P, T(z - T(0.5))) / tools::evaluate_polynomial(Q, T(z - T(0.5)));
BOOST_MATH_INSTRUMENT_VARIABLE(result);
result *= exp(-z * z) / z;
BOOST_MATH_INSTRUMENT_VARIABLE(result);
Expand Down Expand Up @@ -322,7 +322,7 @@ T erf_imp(T z, bool invert, const Policy& pol, const std::integral_constant<int,
BOOST_MATH_BIG_CONSTANT(T, 53, 0.0563921837420478160373),
BOOST_MATH_BIG_CONSTANT(T, 53, 0.00410369723978904575884),
};
result = Y + tools::evaluate_polynomial(P, T(z - 1.5)) / tools::evaluate_polynomial(Q, z - T(1.5));
result = Y + tools::evaluate_polynomial(P, T(z - T(1.5))) / tools::evaluate_polynomial(Q, z - T(1.5));
T hi, lo;
int expon;
hi = floor(ldexp(frexp(z, &expon), 26));
Expand Down Expand Up @@ -355,7 +355,7 @@ T erf_imp(T z, bool invert, const Policy& pol, const std::integral_constant<int,
BOOST_MATH_BIG_CONSTANT(T, 53, 0.0105982906484876531489),
BOOST_MATH_BIG_CONSTANT(T, 53, 0.000479411269521714493907),
};
result = Y + tools::evaluate_polynomial(P, T(z - 3.5)) / tools::evaluate_polynomial(Q, z - T(3.5));
result = Y + tools::evaluate_polynomial(P, T(z - T(3.5))) / tools::evaluate_polynomial(Q, z - T(3.5));
T hi, lo;
int expon;
hi = floor(ldexp(frexp(z, &expon), 26));
Expand Down
3 changes: 2 additions & 1 deletion include/boost/math/special_functions/hermite.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ template <class T1, class T2, class T3>
inline typename tools::promote_args<T1, T2, T3>::type
hermite_next(unsigned n, T1 x, T2 Hn, T3 Hnm1)
{
return (2 * x * Hn - 2 * n * Hnm1);
using promoted_type = tools::promote_args_t<T1, T2, T3>;
return (2 * promoted_type(x) * promoted_type(Hn) - 2 * n * promoted_type(Hnm1));
}

namespace detail{
Expand Down
12 changes: 6 additions & 6 deletions include/boost/math/special_functions/lambert_w.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,7 @@ T lambert_w_positive_rational_float(T z)
BOOST_MATH_STD_USING
if (z < 2)
{
if (z < 0.5)
if (z < T(0.5))
{ // 0.05 < z < 0.5
// Maximum Deviation Found: 2.993e-08
// Expected Error Term : 2.993e-08
Expand Down Expand Up @@ -1119,7 +1119,7 @@ T lambert_w_positive_rational_float(T z)
};
return Y + boost::math::tools::evaluate_rational(P, Q, z);
}
else if (z < 9897.12905874) // 2.8 < log(z) < 9.2
else if (z < T(9897.12905874)) // 2.8 < log(z) < 9.2
{
// Max error in interpolated form: 1.771e-08
static const T Y = -1.402973175e+00f;
Expand All @@ -1139,7 +1139,7 @@ T lambert_w_positive_rational_float(T z)
T log_w = log(z);
return log_w + Y + boost::math::tools::evaluate_polynomial(P, log_w) / boost::math::tools::evaluate_polynomial(Q, log_w);
}
else if (z < 7.896296e+13) // 9.2 < log(z) <= 32
else if (z < T(7.896296e+13)) // 9.2 < log(z) <= 32
{
// Max error in interpolated form: 5.821e-08
static const T Y = -2.735729218e+00f;
Expand Down Expand Up @@ -1184,9 +1184,9 @@ template <typename T, typename Policy>
T lambert_w_negative_rational_float(T z, const Policy& pol)
{
BOOST_MATH_STD_USING
if (z > -0.27)
if (z > T(-0.27))
{
if (z < -0.051)
if (z < T(-0.051))
{
// -0.27 < z < -0.051
// Max error in interpolated form: 5.080e-08
Expand All @@ -1211,7 +1211,7 @@ T lambert_w_negative_rational_float(T z, const Policy& pol)
return lambert_w0_small_z(z, pol);
}
}
else if (z > -0.3578794411714423215955237701)
else if (z > T(-0.3578794411714423215955237701))
{ // Very close to branch singularity.
// Max error in interpolated form: 5.269e-08
static const T Y = 1.220928431e-01f;
Expand Down
2 changes: 1 addition & 1 deletion include/boost/math/special_functions/sin_pi.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ inline T sin_pi_imp(T x, const Policy& pol)
if(x < 0)
return -sin_pi_imp(T(-x), pol);
// sin of pi*x:
if(x < 0.5)
if(x < T(0.5))
return sin(constants::pi<T>() * x);
bool invert;
if(x < 1)
Expand Down