2
0
mirror of https://github.com/boostorg/math.git synced 2026-02-25 16:32:15 +00:00

Junk removal

Removal of junk headers, typos, or mistakenly duplicated keywords
This commit is contained in:
Rose
2022-10-30 12:26:52 -04:00
parent cb326912f5
commit fe48a3bba7
58 changed files with 95 additions and 103 deletions

View File

@@ -64,7 +64,7 @@ inline constexpr T abs(T x) noexcept
}
else
{
static_assert(sizeof(T) == 0, "Taking the absolute value of an unsigned value not covertible to int is UB.");
static_assert(sizeof(T) == 0, "Taking the absolute value of an unsigned value not convertible to int is UB.");
return T(0); // Unreachable, but suppresses warnings
}
}

View File

@@ -28,7 +28,7 @@ template <typename ReturnType, typename Z>
inline constexpr ReturnType div_impl(const Z x, const Z y) noexcept
{
// std::div_t/ldiv_t/lldiv_t/imaxdiv_t can be defined as either { Z quot; Z rem; }; or { Z rem; Z quot; };
// so don't use braced initialziation to guarantee compatibility
// so don't use braced initialization to guarantee compatibility
ReturnType ans {0, 0};
ans.quot = x / y;

View File

@@ -16,7 +16,6 @@
#include <limits>
#include <boost/math/special_functions/sign.hpp>
#include <boost/math/special_functions/fpclassify.hpp>
#include <boost/math/special_functions/sign.hpp>
#include <boost/math/constants/constants.hpp>
namespace boost{ namespace math{ namespace detail{

View File

@@ -42,14 +42,14 @@ class distribution_archetype
public:
typedef RealType value_type;
distribution_archetype(const distribution_archetype&); // Copy constructible.
distribution_archetype(const distribution_archetype&); // Copy constructable.
distribution_archetype& operator=(const distribution_archetype&); // Assignable.
// There is no default constructor,
// but we need a way to instantiate the archetype:
static distribution_archetype& get_object()
{
// will never get caled:
// will never get called:
return *reinterpret_cast<distribution_archetype*>(nullptr);
}
}; // template <class RealType>class distribution_archetype

View File

@@ -136,14 +136,14 @@ class fvar {
// Initialize a variable or constant.
fvar(root_type const&, bool const is_variable);
// RealType(cr) | RealType | RealType is copy constructible.
// RealType(cr) | RealType | RealType is copy constructable.
fvar(fvar const&) = default;
// Be aware of implicit casting from one fvar<> type to another by this copy constructor.
template <typename RealType2, size_t Order2>
fvar(fvar<RealType2, Order2> const&);
// RealType(ca) | RealType | RealType is copy constructible from the arithmetic types.
// RealType(ca) | RealType | RealType is copy constructable from the arithmetic types.
explicit fvar(root_type const&); // Initialize a constant. (No epsilon terms.)
template <typename RealType2>

View File

@@ -151,7 +151,7 @@ namespace boost
return dist.success_fraction();
} // mean
// Rely on dereived_accessors quantile(half)
// Rely on derived_accessors quantile(half)
//template <class RealType>
//inline RealType median(const bernoulli_distribution<RealType, Policy>& dist)
//{ // Median of bernoulli distribution is not defined.

View File

@@ -554,7 +554,6 @@ namespace boost
// for this distribution have been defined, in order to
// keep compilers that support two-phase lookup happy.
#include <boost/math/distributions/detail/derived_accessors.hpp>
#include <boost/math/distributions/detail/inv_discrete_quantile.hpp>
#endif // BOOST_MATH_SPECIAL_POISSON_HPP

View File

@@ -362,7 +362,7 @@ namespace boost{ namespace math
RealType lower = dist.lower();
RealType upper = dist.upper();
RealType result = 0; // of checks.
if(false == detail::check_uniform("boost::math::kurtosis_execess(const uniform_distribution<%1%>&)", lower, upper, &result, Policy()))
if(false == detail::check_uniform("boost::math::kurtosis_excess(const uniform_distribution<%1%>&)", lower, upper, &result, Policy()))
{
return result;
}

View File

@@ -112,7 +112,7 @@ public:
using std::fma;
// control_points_.size() == n + 1
RandomAccessContainer c(control_points_.size() + 1);
// This is the constant of integration, chosen arbitarily to be zero:
// This is the constant of integration, chosen arbitrarily to be zero:
for (Z j = 0; j < control_points_[0].size(); ++j) {
c[0][j] = Real(0);
}

View File

@@ -192,7 +192,7 @@ cardinal_cubic_b_spline_imp<Real>::cardinal_cubic_b_spline_imp(BidiIterator f, B
// There are, in fact 5 diagonals, but they only differ from zero on the first and last row,
// so we can patch up the tridiagonal row reduction algorithm to deal with two special rows.
// See Kress, equations 8.41
// The the "tridiagonal" matrix is:
// The "tridiagonal" matrix is:
// 1 0 -1
// 1 4 1
// 1 4 1

View File

@@ -50,7 +50,7 @@ public:
auto integrate(const F f, Real tolerance, Real* error, Real* L1, std::size_t* levels)->decltype(std::declval<F>()(std::declval<Real>())) const;
private:
private:
const std::vector<Real>& get_abscissa_row(std::size_t n)const
{
#if !defined(BOOST_MATH_NO_ATOMIC_INT) && defined(BOOST_HAS_THREADS)

View File

@@ -1439,7 +1439,7 @@ T ibeta_derivative_imp(T a, T b, T x, const Policy& pol)
return f1;
}
//
// Some forwarding functions that dis-ambiguate the third argument type:
// Some forwarding functions that disambiguate the third argument type:
//
template <class RT1, class RT2, class Policy>
inline typename tools::promote_args<RT1, RT2>::type

View File

@@ -155,7 +155,7 @@ inline bool asymptotic_bessel_large_x_limit(const T& v, const T& x)
}
template <class T, class Policy>
void temme_asyptotic_y_small_x(T v, T x, T* Y, T* Y1, const Policy& pol)
void temme_asymptotic_y_small_x(T v, T x, T* Y, T* Y1, const Policy& pol)
{
T c = 1;
T p = (v / boost::math::sin_pi(v, pol)) * pow(x / 2, -v) / boost::math::tgamma(1 - v, pol);

View File

@@ -213,4 +213,4 @@ inline T bessel_y_derivative_small_z_series(T v, T x, const Policy& pol)
}}} // namespaces
#endif // BOOST_MATH_BESSEL_JY_DERIVATVIES_SERIES_HPP
#endif // BOOST_MATH_BESSEL_JY_DERIVATIVES_SERIES_HPP

View File

@@ -247,7 +247,7 @@
if (have_no_correct_bits)
{
// We have no correct bits in the result... just give up!
result = boost::math::policies::raise_evaluation_error("boost::math::hypergeometric_pFq<%1%>", "Cancellation is so severe that no bits in the reuslt are correct, last result was %1%", Real(result * exp(Real(log_scale))), pol);
result = boost::math::policies::raise_evaluation_error("boost::math::hypergeometric_pFq<%1%>", "Cancellation is so severe that no bits in the result are correct, last result was %1%", Real(result * exp(Real(log_scale))), pol);
return std::make_pair(result, result);
}
else

View File

@@ -1263,7 +1263,3 @@ inline typename tools::promote_args<T>::type erfc(T z)
#include <boost/math/special_functions/detail/erf_inv.hpp>
#endif // BOOST_MATH_SPECIAL_ERF_HPP

View File

@@ -1275,7 +1275,7 @@ T gamma_incomplete_imp(T a, T x, bool normalised, bool invert,
else if(x < 1.1)
{
//
// Changover here occurs when P ~ 0.75 or Q ~ 0.25:
// Changeover here occurs when P ~ 0.75 or Q ~ 0.25:
//
if(x * 0.75f < a)
{

View File

@@ -683,7 +683,7 @@ z * (2.154990206091088289321708745358647e6L // z^20 distance -5 without term 20
// N[InverseSeries[Series[z Exp[z],{z,0,34}]],50],
// and are suffixed by L as they are assumed of type long double.
// (This is NOT used for 128-bit quad boost::multiprecision::float128 type which required a suffix Q
// nor multiprecision type cpp_bin_float_quad that can only be initialised at full precision of the type
// nor multiprecision type cpp_bin_float_quad that can only be initialized at full precision of the type
// constructed with a decimal digit string like "2.6666666666666666666666666666666666666666666666667".)
template <typename T, typename Policy>

View File

@@ -223,7 +223,6 @@ namespace boost {
*it = fill;
}
private:
const int flags_;
};
@@ -573,7 +572,6 @@ namespace boost {
return !*s;
} // bool match_string
private:
const int flags_;
}; //

View File

@@ -170,7 +170,7 @@ inline typename tools::promote_args<T1, T2>::type
{
typedef typename tools::promote_args<T1, T2>::type result_type;
typedef typename policies::evaluation<result_type, Policy>::type value_type;
return policies::checked_narrowing_cast<result_type, Policy>(detail::spherical_harmonic_r(n, m, static_cast<value_type>(theta), static_cast<value_type>(phi), pol), "bost::math::spherical_harmonic_r<%1%>(unsigned, int, %1%, %1%)");
return policies::checked_narrowing_cast<result_type, Policy>(detail::spherical_harmonic_r(n, m, static_cast<value_type>(theta), static_cast<value_type>(phi), pol), "boost::math::spherical_harmonic_r<%1%>(unsigned, int, %1%, %1%)");
}
template <class T1, class T2>

View File

@@ -168,9 +168,6 @@
#include <cmath>
#include <climits>
#include <cfloat>
#if (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__))
# include <math.h>
#endif
#include <boost/math/tools/user.hpp>

View File

@@ -29,7 +29,7 @@ namespace boost{ namespace math{ namespace tools{
#ifdef BOOST_MATH_NO_LEXICAL_CAST
// This function should not compile, we don't have the necessary functionality to support it:
static_assert(sizeof(Real) == 0, "boost.lexical_cast is not supported in standalone mode.");
(void)p; // Supresses -Wunused-parameter
(void)p; // Suppresses -Wunused-parameter
return Real(0);
#else
return boost::lexical_cast<Real>(p);

View File

@@ -221,7 +221,7 @@ subresultant_gcd(polynomial<T> u, polynomial<T> v)
* The multi-precision constraint is enforced via numeric_limits.
*
* Note that intermediate terms in the evaluation can grow arbitrarily large, hence the need for
* unbounded integers, otherwise numeric loverflow would break the algorithm.
* unbounded integers, otherwise numeric overflow would break the algorithm.
*
* @tparam T A multi-precision integral type.
*/

View File

@@ -182,8 +182,8 @@ struct log_limit_traits
std::integral_constant<int, (std::numeric_limits<T>::max_exponent > INT_MAX ? INT_MAX : static_cast<int>(std::numeric_limits<T>::max_exponent))>,
std::integral_constant<int, 0>
>::type tag_type;
static constexpr bool value = tag_type::value ? true : false;
static_assert(::std::numeric_limits<T>::is_specialized || (value == 0), "Type T must be specialized or equal to 0");
static constexpr bool value = (tag_type::value != 0);
static_assert(::std::numeric_limits<T>::is_specialized || !value, "Type T must be specialized or equal to 0");
};
template <class T, bool b> struct log_limit_noexcept_traits_imp : public log_limit_traits<T> {};

View File

@@ -68,7 +68,7 @@ inline T create_test_value(largest_float val, const char*, const std::true_type&
template <class T>
inline T create_test_value(largest_float, const char* str, const std::false_type&, const std::true_type&)
{ // Construct from decimal digit string const char* @c str (ignoring long double parameter).
// For example, extended precision or other User-Defined types which ARE constructible from a string
// For example, extended precision or other User-Defined types which ARE constructable from a string
// (but not from double, or long double without loss of precision).
// (This is case for MPL parameters = false_type and T2 == true_type).
#ifdef BOOST_MATH_INSTRUMENT_CREATE_TEST_VALUE
@@ -80,8 +80,8 @@ inline T create_test_value(largest_float, const char* str, const std::false_type
template <class T>
inline T create_test_value(largest_float, const char* str, const std::false_type&, const std::false_type&)
{ // Create test value using from lexical cast of decimal digit string const char* str.
// For example, extended precision or other User-Defined types which are NOT constructible from a string
// (NOR constructible from a long double).
// For example, extended precision or other User-Defined types which are NOT constructable from a string
// (NOR constructable from a long double).
// (This is case T1 = false_type and T2 == false_type).
#ifdef BOOST_MATH_INSTRUMENT_CREATE_TEST_VALUE
create_type = 3;

View File

@@ -10,6 +10,10 @@
#pragma once
#endif
#if (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__))
# include <math.h>
#endif
#include <boost/math/tools/config.hpp>
namespace boost{ namespace math{ namespace tools{