* @defgroup mathsf Mathematical Special Functions
* @ingroup numerics
*
+ * @section mathsf_desc Mathematical Special Functions
+ *
* A collection of advanced mathematical special functions,
- * defined by ISO/IEC IS 29124.
- * @{
- */
-
- /**
- * @mainpage Mathematical Special Functions
+ * defined by ISO/IEC IS 29124 and then added to ISO C++ 2017.
*
- * @section intro Introduction and History
+ *
+ * @subsection mathsf_intro Introduction and History
* The first significant library upgrade on the road to C++2011,
* <a href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1836.pdf">
* TR1</a>, included a set of 23 mathematical functions that significantly
*
* For C++17 these functions were incorporated into the main standard.
*
- * @section contents Contents
+ * @subsection mathsf_contents Contents
* The following functions are implemented in namespace @c std:
* - @ref assoc_laguerre "assoc_laguerre - Associated Laguerre functions"
* - @ref assoc_legendre "assoc_legendre - Associated Legendre functions"
* - @ref __gnu_cxx::conf_hyperg "conf_hyperg - Confluent hypergeometric functions"
* - @ref __gnu_cxx::hyperg "hyperg - Hypergeometric functions"
*
- * @section general General Features
+ * <!-- @subsection mathsf_general General Features -->
*
- * @subsection promotion Argument Promotion
+ * @subsection mathsf_promotion Argument Promotion
* The arguments suppled to the non-suffixed functions will be promoted
* according to the following rules:
* 1. If any argument intended to be floating point is given an integral value
* 2. All floating point arguments are promoted up to the largest floating
* point precision among them.
*
- * @subsection NaN NaN Arguments
+ * @subsection mathsf_NaN NaN Arguments
* If any of the floating point arguments supplied to these functions is
* invalid or NaN (std::numeric_limits<Tp>::quiet_NaN),
* the value NaN is returned.
*
- * @section impl Implementation
+ * @subsection mathsf_impl Implementation
*
* We strive to implement the underlying math with type generic algorithms
* to the greatest extent possible. In practice, the functions are thin
* Similaryly, <tt>long double</tt> should give you more dynamic range
* and slightly more pecision than @c double on many systems.
*
- * @section testing Testing
+ * @subsection mathsf_testing Testing
*
* These functions have been tested against equivalent implementations
* from the <a href="http://www.gnu.org/software/gsl">
* Gnu Scientific Library, GSL</a> and
- * <a href="http://www.boost.org/doc/libs/1_60_0/libs/math/doc/html/index.html>Boost</a>
+ * <a href="http://www.boost.org/doc/libs/1_60_0/libs/math/doc/html/index.html">Boost</a>
* and the ratio
* @f[
* \frac{|f - f_{test}|}{|f_{test}|}
* @f]
- * is generally found to be within 10^-15 for 64-bit double on linux-x86_64 systems
- * over most of the ranges of validity.
+ * is generally found to be within 10<sup>-15</sup> for 64-bit double on
+ * linux-x86_64 systems over most of the ranges of validity.
*
* @todo Provide accuracy comparisons on a per-function basis for a small
* number of targets.
*
- * @section bibliography General Bibliography
+ * @subsection mathsf_bibliography General Bibliography
*
* @see Abramowitz and Stegun: Handbook of Mathematical Functions,
* with Formulas, Graphs, and Mathematical Tables
*
* @see The Special Functions and Their Approximations: Volumes 1 and 2,
* by Yudell L. Luke, Academic Press, 1969
+ *
+ * @{
*/
// Associated Laguerre polynomials
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
+ /** @addtogroup mathsf
+ * @{
+ */
+
// Airy functions
/**
return std::__detail::__hyperg<__type>(__a, __b, __c, __x);
}
+ // @}
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace __gnu_cxx
#endif // __STRICT_ANSI__
#endif // C++11
+} // namespace tr1
+_GLIBCXX_END_NAMESPACE_VERSION
+} // namespace std
+
+/**
+ * @defgroup tr1_math_spec_func TR1 Mathematical Special Functions
+ * @ingroup numerics
+ *
+ * A collection of advanced mathematical special functions.
+ */
+
#if _GLIBCXX_USE_STD_SPEC_FUNCS
- /**
- * @defgroup tr1_math_spec_func Mathematical Special Functions
- * @ingroup numerics
- *
- * A collection of advanced mathematical special functions.
- * @{
- */
+namespace std _GLIBCXX_VISIBILITY(default)
+{
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+namespace tr1
+{
using std::assoc_laguerref;
using std::assoc_laguerrel;
using std::assoc_laguerre;
using std::sph_neumannl;
using std::sph_neumann;
- /* @} */ // tr1_math_spec_func
-
-#else // ! _GLIBCXX_USE_STD_SPEC_FUNCS
-
} // namespace tr1
-
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
+#else // ! _GLIBCXX_USE_STD_SPEC_FUNCS
+
#include <bits/stl_algobase.h>
#include <limits>
#include <tr1/type_traits>
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
-
namespace tr1
-{
- /**
- * @defgroup tr1_math_spec_func Mathematical Special Functions
- * @ingroup numerics
- *
- * A collection of advanced mathematical special functions.
- * @{
+ {
+ /** @addtogroup tr1_math_spec_func
+ * @{
*/
inline float
return __detail::__sph_neumann<__type>(__n, __x);
}
- /* @} */ // tr1_math_spec_func
-#endif // _GLIBCXX_USE_STD_SPEC_FUNCS
+ // @} tr1_math_spec_func
} // namespace tr1
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
+#endif // _GLIBCXX_USE_STD_SPEC_FUNCS
+
#if _GLIBCXX_USE_STD_SPEC_FUNCS && !defined(__STRICT_ANSI__)
namespace std _GLIBCXX_VISIBILITY(default)
{
namespace tr1
{
+ /** @addtogroup tr1_math_spec_func
+ * @{
+ */
+
inline float
conf_hypergf(float __a, float __c, float __x)
{ return __detail::__conf_hyperg<float>(__a, __c, __x); }
return __detail::__hyperg<__type>(__a, __b, __c, __x);
}
+ // @} tr1_math_spec_func
+
} // namespace tr1
_GLIBCXX_END_NAMESPACE_VERSION