Updraft  1.0
Open source glider flight visualisation tool.
GeographicLib::Math Class Reference

Mathematical functions needed by GeographicLib. More...

#include <Math.hpp>

List of all members.

Public Types

typedef double extended
typedef double real
 The real type for GeographicLib.

Static Public Member Functions

template<typename T >
static T pi () throw ()
static real pi () throw ()
 A synonym for pi<real>().
template<typename T >
static T degree () throw ()
static real degree () throw ()
 A synonym for degree<real>().
template<typename T >
static T sq (T x) throw ()
 Square a number.
static double hypot (double x, double y) throw ()
static float hypot (float x, float y) throw ()
static double expm1 (double x) throw ()
static float expm1 (float x) throw ()
static double log1p (double x) throw ()
static float log1p (float x) throw ()
static double asinh (double x) throw ()
static float asinh (float x) throw ()
static double atanh (double x) throw ()
static float atanh (float x) throw ()
static double cbrt (double x) throw ()
static float cbrt (float x) throw ()
template<typename T >
static bool isfinite (T x) throw ()
 Test for finiteness.
template<typename T >
static T NaN () throw ()
 The NaN (not a number)
static real NaN () throw ()
 A synonym for NaN<real>().
template<typename T >
static bool isnan (T x) throw ()
 Test for NaN.
template<typename T >
static T infinity () throw ()
 Infinity.
static real infinity () throw ()
 A synonym for infinity<real>().
template<typename T >
static T swab (T x)
 Swap the bytes of a quantity.

Static Public Attributes

static const bool bigendian = WORDS_BIGENDIAN
 true if the machine is big-endian

Private Member Functions

void dummy ()
 Math ()

Detailed Description

Mathematical functions needed by GeographicLib.

Define mathematical functions in order to localize system dependencies and to provide generic versions of the functions. In addition define a real type to be used by GeographicLib.

Example of use:


Member Typedef Documentation

typedef double GeographicLib::Math::real

The real type for GeographicLib.

Nearly all the testing has been done with real = double. However, the algorithms should also work with float and long double (where available). (CAUTION: reasonable accuracy typically cannot be obtained using floats.)


Constructor & Destructor Documentation


Member Function Documentation

static double GeographicLib::Math::asinh ( double  x) throw () [inline, static]
static float GeographicLib::Math::asinh ( float  x) throw () [inline, static]
static double GeographicLib::Math::atanh ( double  x) throw () [inline, static]
static float GeographicLib::Math::atanh ( float  x) throw () [inline, static]
static double GeographicLib::Math::cbrt ( double  x) throw () [inline, static]
static float GeographicLib::Math::cbrt ( float  x) throw () [inline, static]
template<typename T >
static T GeographicLib::Math::degree ( ) throw () [inline, static]
Template Parameters:
Tthe type of the returned value.
Returns:
the number of radians in a degree.
static real GeographicLib::Math::degree ( ) throw () [inline, static]

A synonym for degree<real>().

void GeographicLib::Math::dummy ( ) [inline, private]
static double GeographicLib::Math::expm1 ( double  x) throw () [inline, static]
static float GeographicLib::Math::expm1 ( float  x) throw () [inline, static]
static double GeographicLib::Math::hypot ( double  x,
double  y 
) throw () [inline, static]
static float GeographicLib::Math::hypot ( float  x,
float  y 
) throw () [inline, static]
template<typename T >
static T GeographicLib::Math::infinity ( ) throw () [inline, static]

Infinity.

Template Parameters:
Tthe type of the returned value.
Returns:
infinity if available, otherwise return the max real.
static real GeographicLib::Math::infinity ( ) throw () [inline, static]

A synonym for infinity<real>().

template<typename T >
static bool GeographicLib::Math::isfinite ( x) throw () [inline, static]

Test for finiteness.

Template Parameters:
Tthe type of the argument.
Parameters:
[in]x
Returns:
true if number is finite, false if NaN or infinite.
template<typename T >
static bool GeographicLib::Math::isnan ( x) throw () [inline, static]

Test for NaN.

Template Parameters:
Tthe type of the argument.
Parameters:
[in]x
Returns:
true if argument is a NaN.
static double GeographicLib::Math::log1p ( double  x) throw () [inline, static]
static float GeographicLib::Math::log1p ( float  x) throw () [inline, static]
template<typename T >
static T GeographicLib::Math::NaN ( ) throw () [inline, static]

The NaN (not a number)

Template Parameters:
Tthe type of the returned value.
Returns:
NaN if available, otherwise return the max real.
static real GeographicLib::Math::NaN ( ) throw () [inline, static]

A synonym for NaN<real>().

template<typename T >
static T GeographicLib::Math::pi ( ) throw () [inline, static]
Template Parameters:
Tthe type of the returned value.
Returns:
pi.
static real GeographicLib::Math::pi ( ) throw () [inline, static]

A synonym for pi<real>().

template<typename T >
static T GeographicLib::Math::sq ( x) throw () [inline, static]

Square a number.

Template Parameters:
Tthe type of the argument and the returned value.
Parameters:
[in]x
Returns:
x2.
template<typename T >
static T GeographicLib::Math::swab ( x) [inline, static]

Swap the bytes of a quantity.

Template Parameters:
Tthe type of the argument and the returned value.
Parameters:
[in]x
Returns:
x with its bytes swapped.

Member Data Documentation

true if the machine is big-endian


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines