-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cb970a9
commit 787513d
Showing
1 changed file
with
19 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,15 +14,7 @@ | |
#include "Ostap/Math.h" | ||
// ============================================================================ | ||
/// local namespace to hide all tehcnical symbols | ||
#if __cplusplus == 201703L | ||
#ifndef CONSTEXP | ||
#define CONSTEXP constexpr | ||
#endif | ||
#else | ||
#ifndef CONSTEXP | ||
#define CONSTEXP const | ||
#endif | ||
#endif | ||
|
||
|
||
namespace | ||
{ | ||
|
@@ -69,14 +61,14 @@ namespace | |
/** @var s_INFINITY_LOG_POS | ||
* representation of positive INFINITY_LOG | ||
*/ | ||
CONSTEXP double s_INFINITY_LOG_POS = std::log ( s_INFINITY ) ; | ||
const double s_INFINITY_LOG_POS = std::log ( s_INFINITY ) ; | ||
/** @var s_INFINITY_LOG | ||
* representation of positive INFINITY_LOG | ||
*/ | ||
/** @var s_INFINITY_LOG_NEG | ||
* representation of negative INFINITY_LOG | ||
*/ | ||
CONSTEXP double s_INFINITY_LOG_NEG = std::log ( 2 * s_SMALL2 ) ; | ||
const double s_INFINITY_LOG_NEG = std::log ( 2 * s_SMALL2 ) ; | ||
|
||
// ========================================================================== | ||
// Constants | ||
|
@@ -86,98 +78,98 @@ namespace | |
* @author Vanya BELYAEV [email protected] | ||
* @date 2010-05-23 | ||
*/ | ||
CONSTEXP double s_LN10 = std::log ( 10 ) ; | ||
const double s_LN10 = std::log ( 10 ) ; | ||
// ========================================================================== | ||
/** @var s_SQRTPIHALF | ||
* helper constant \f$ \sqrt{\frac{\pi}{2}}\f$ | ||
* @author Vanya BELYAEV [email protected] | ||
* @date 2010-04-19 | ||
*/ | ||
CONSTEXP double s_SQRTPIHALF = std::sqrt( M_PI_2 ) ; | ||
const double s_SQRTPIHALF = std::sqrt( M_PI_2 ) ; | ||
// ========================================================================== | ||
/** @var s_SQRTPI | ||
* helper constant \f$ \sqrt{\pi}\f$ | ||
* @author Vanya BELYAEV [email protected] | ||
* @date 2016-06-11 | ||
*/ | ||
CONSTEXP double s_SQRTPI = std::sqrt( M_PI ) ; | ||
const double s_SQRTPI = std::sqrt( M_PI ) ; | ||
// ========================================================================== | ||
/** @var s_SQRT2PI | ||
* helper constant \f$ \sqrt{2\pi}\f$ | ||
* @author Vanya BELYAEV [email protected] | ||
* @date 2010-04-19 | ||
*/ | ||
CONSTEXP double s_SQRT2PI = std::sqrt ( 2 * M_PI ) ; | ||
const double s_SQRT2PI = std::sqrt ( 2 * M_PI ) ; | ||
// =========================================================================== | ||
/** @var s_SQRT2PIi | ||
* helper constant \f$ \frac{1}{\sqrt{2\pi}}\f$ | ||
* @author Vanya BELYAEV [email protected] | ||
* @date 2010-04-19 | ||
*/ | ||
CONSTEXP double s_SQRT2PIi = 1./s_SQRT2PI ; | ||
const double s_SQRT2PIi = 1./s_SQRT2PI ; | ||
// =========================================================================== | ||
/** @var s_SQRT2 | ||
* helper constant \f$\sqrt{2}\f$ | ||
* @author Vanya BELYAEV [email protected] | ||
* @date 2013-08-25 | ||
*/ | ||
CONSTEXP double s_SQRT2 = std::sqrt ( 2.0 ) ; | ||
const double s_SQRT2 = std::sqrt ( 2.0 ) ; | ||
// =========================================================================== | ||
/** @var s_SQRT2i | ||
* helper constant \f$\frac{1}{\sqrt{2}}\f$ | ||
* @author Vanya BELYAEV [email protected] | ||
* @date 2013-08-25 | ||
*/ | ||
CONSTEXP double s_SQRT2i = 1/std::sqrt ( 2.0 ) ; | ||
const double s_SQRT2i = 1/std::sqrt ( 2.0 ) ; | ||
// =========================================================================== | ||
/** @var s_HALFSQRTPI | ||
* helper constant \f$ \frac{\sqrt{\pi}}{2}\f$ | ||
* @author Vanya BELYAEV [email protected] | ||
* @date 2010-04-19 | ||
*/ | ||
CONSTEXP double s_HALFSQRTPI = 0.5 * std::sqrt( M_PI ) ; | ||
const double s_HALFSQRTPI = 0.5 * std::sqrt( M_PI ) ; | ||
// ========================================================================== | ||
/** @var s_HALFSQRTPIi | ||
* helper constant \f$ \frac{2}{\sqrt{\pi}}\f$ | ||
* @author Vanya BELYAEV [email protected] | ||
* @date 2010-04-19 | ||
*/ | ||
CONSTEXP double s_HALFSQRTPIi = 1/s_HALFSQRTPI ; | ||
const double s_HALFSQRTPIi = 1/s_HALFSQRTPI ; | ||
// ========================================================================== | ||
/** @var s_SQRT3 | ||
* helper constant \f$ \sqrt{3} \f$ | ||
* @author Vanya BELYAEV [email protected] | ||
* @date 2015-08-21 | ||
*/ | ||
CONSTEXP double s_SQRT3 = std::sqrt ( 3.0 ) ; | ||
const double s_SQRT3 = std::sqrt ( 3.0 ) ; | ||
// ========================================================================== | ||
/** @var s_HALFSQRTPI_log | ||
* helper constant \f$ \log \frac{\sqrt{\pi}}{2}\f$ | ||
* @author Vanya BELYAEV [email protected] | ||
* @date 2010-04-19 | ||
*/ | ||
CONSTEXP double s_HALFSQRTPI_log = std::log ( 0.5 * std::sqrt( M_PI ) ) ; | ||
const double s_HALFSQRTPI_log = std::log ( 0.5 * std::sqrt( M_PI ) ) ; | ||
// ========================================================================== | ||
/** @var s_SQRT2PISQUARED | ||
* helper constant \f$ \sqrt{2}\pi^2\f$ | ||
* @author Vanya BELYAEV [email protected] | ||
* @date 2016-06-11 | ||
*/ | ||
CONSTEXP double s_SQRT2PISQUARED = std::sqrt(2.0)*M_PI*M_PI ; | ||
const double s_SQRT2PISQUARED = std::sqrt(2.0)*M_PI*M_PI ; | ||
// ========================================================================== | ||
/** @var s_SQRT2PISQUAREDi | ||
* helper constant \f$ \frac{1}{\sqrt{2}\pi^2}\f$ | ||
* @author Vanya BELYAEV [email protected] | ||
* @date 2016-06-11 | ||
*/ | ||
CONSTEXP double s_SQRT2PISQUAREDi = 1.0/(std::sqrt(2.0)*M_PI*M_PI) ; | ||
const double s_SQRT2PISQUAREDi = 1.0/(std::sqrt(2.0)*M_PI*M_PI) ; | ||
// ========================================================================== | ||
/** @var s_SQRT3overPI | ||
* helper constant \f$ \frac{\sqrt{3}}{\pi} \f$ | ||
* @author Vanya BELYAEV [email protected] | ||
* @date 2016-06-14 | ||
*/ | ||
CONSTEXP double s_SQRT3overPI = std::sqrt(3.0)/M_PI ; | ||
const double s_SQRT3overPI = std::sqrt(3.0)/M_PI ; | ||
// ========================================================================== | ||
// Bukin & Co | ||
// ========================================================================== | ||
|
@@ -187,15 +179,15 @@ namespace | |
* @author Vanya BELYAEV [email protected] | ||
* @date 2010-04-19 | ||
*/ | ||
CONSTEXP double s_Bukin = std::sqrt ( 2.0 * std::log ( 2.0 ) ) ; | ||
const double s_Bukin = std::sqrt ( 2.0 * std::log ( 2.0 ) ) ; | ||
// ========================================================================== | ||
/** @var s_ln2 | ||
* useful constant for Bukin's function | ||
* \f$ \log 2 \f$ | ||
* @author Vanya BELYAEV [email protected] | ||
* @date 2010-04-19 | ||
*/ | ||
CONSTEXP double s_ln2 = std::log ( 2.0 ) ; | ||
const double s_ln2 = std::log ( 2.0 ) ; | ||
|
||
|
||
// ========================================================================== | ||
|