|
@ -0,0 +1,21 @@ |
|
|
|
|
|
--- a/boost/math/tools/roots.hpp
|
|
|
|
|
|
+++ b/boost/math/tools/roots.hpp
|
|
|
|
|
|
@@ -665,8 +665,8 @@ namespace detail
|
|
|
|
|
|
inline T discriminant(T const & a, T const & b, T const & c) |
|
|
|
|
|
{ |
|
|
|
|
|
T w = 4*a*c; |
|
|
|
|
|
- T e = std::fma(-c, 4*a, w);
|
|
|
|
|
|
- T f = std::fma(b, b, -w);
|
|
|
|
|
|
+ T e = fma(-c, 4*a, w);
|
|
|
|
|
|
+ T f = fma(b, b, -w);
|
|
|
|
|
|
return f + e; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
@@ -674,7 +674,6 @@ namespace detail
|
|
|
|
|
|
template<class T> |
|
|
|
|
|
auto quadratic_roots(T const& a, T const& b, T const& c) |
|
|
|
|
|
{ |
|
|
|
|
|
- using std::copysign;
|
|
|
|
|
|
using std::sqrt; |
|
|
|
|
|
if constexpr (std::is_integral<T>::value) |
|
|
|
|
|
{ |