All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GMath.hpp File Reference

Mathematical function definitions. More...

#include <cmath>

Go to the source code of this file.




double gammalib::acos (const double &arg)
 Computes acos by avoiding NaN due to rounding errors. More...
double gammalib::atan2 (const double &y, const double &x)
 Compute arc tangens in radians. More...
double gammalib::cosd (const double &angle)
 Compute cosine of angle in degrees. More...
double gammalib::sind (const double &angle)
 Compute sine of angle in degrees. More...
double gammalib::tand (const double &angle)
 Compute tangens of angle in degrees. More...
double gammalib::asind (const double &value)
 Compute arc sine in degrees. More...
double gammalib::acosd (const double &value)
 Compute arc cosine in degrees. More...
double gammalib::atand (const double &value)
 Compute arc tangens in degrees. More...
double gammalib::atan2d (const double &y, const double &x)
 Compute arc tangens in degrees. More...
void gammalib::sincosd (const double &angle, double *s, double *c)
 Compute sine and cosine of angle in degrees. More...
double gammalib::gammln (const double &arg)
 Computes logarithm of gamma function. More...
double gammalib::erf (const double &arg)
 Computes error function. More...
double gammalib::erfc (const double &arg)
 Computes complementary error function. More...
double gammalib::erfinv (const double &arg)
 Computes inverse error function. More...
double gammalib::modulo (const double &v1, const double &v2)
 Returns the remainder of the division. More...
double gammalib::plaw_integral (const double &x1, const double &f1, const double &x2, const double &f2)
 Returns the integral of a power law. More...
double gammalib::gauss_integral (const double &x1, const double &x2)
 Returns the integral of a Gaussian function. More...


const double gammalib::pi = 3.141592653589793238462643383279502884197
const double gammalib::twopi = 6.283185307179586476925286766559005768394
const double gammalib::fourpi = 12.56637061435917295385057353311801153679
const double gammalib::pihalf = 1.570796326794896619231321691639751442099
const double gammalib::inv_pihalf = 0.6366197723675813430755350534900574
const double gammalib::inv_sqrt4pi = 0.2820947917738781434740397257803862929220
const double gammalib::inv_sqrt2pi = 0.3989422804014327028632180827116826549172
const double gammalib::pi2 = pi*pi
const double gammalib::deg2rad = 0.0174532925199432954743717
const double gammalib::rad2deg = 57.295779513082322864647722
const double gammalib::ln2 = 0.6931471805599453094172321214581766
const double gammalib::ln10 = 2.3025850929940456840179914546843642
const double gammalib::inv_ln2 = 1.4426950408889634073599246810018921
const double gammalib::onethird = 1.0/3.0
const double gammalib::twothird = 2.0/3.0
const double gammalib::fourthird = 4.0/3.0
const double gammalib::sqrt_onehalf = std::sqrt(1.0/2.0)
const double gammalib::sqrt_two = std::sqrt(2.0)
const double gammalib::sqrt_pihalf = std::sqrt(pihalf)
const double gammalib::sqrt_twopi = std::sqrt(twopi)
const double gammalib::inv_ln10 = 1.0/ln10
const double gammalib::inv_loge = 1.0/std::log10(std::exp(1.0))

Detailed Description

Mathematical function definitions.

Juergen Knoedlseder

Definition in file GMath.hpp.