Loading...
Searching...
No Matches
Math.hpp File Reference

Header for GeographicLib::Math class. More...

`#include <GeographicLib/Constants.hpp>`
`#include <cmath>`
`#include <algorithm>`
`#include <limits>`

Go to the source code of this file.

## Classes

class | GeographicLib::Math
| Mathematical functions needed by GeographicLib. More...

## Namespaces

namespace | GeographicLib
| Namespace for GeographicLib.

## Macros

#define | GEOGRAPHICLIB_WORDS_BIGENDIAN 0
#define | GEOGRAPHICLIB_HAVE_LONG_DOUBLE 0
#define | GEOGRAPHICLIB_PRECISION 2
#define | GEOGRAPHICLIB_VOLATILE volatile
#define | GEOGRAPHICLIB_PANIC(msg)

## Detailed Description

Header for GeographicLib::Math class.

Copyright (c) Charles Karney (2008-2024) karne.nosp@m.y@al.nosp@m.um.mi.nosp@m.t.ed.nosp@m.u and licensed under the MIT/X11 License. For more information, see https://geographiclib.sourceforge.io/

Definition in file Math.hpp.

## Macro Definition Documentation

## GEOGRAPHICLIB_WORDS_BIGENDIAN

#define GEOGRAPHICLIB_WORDS_BIGENDIAN 0

Definition at line 18 of file Math.hpp.

## GEOGRAPHICLIB_HAVE_LONG_DOUBLE

#define GEOGRAPHICLIB_HAVE_LONG_DOUBLE 0

Definition at line 22 of file Math.hpp.

## GEOGRAPHICLIB_PRECISION

#define GEOGRAPHICLIB_PRECISION 2

The precision of floating point numbers used in GeographicLib. 1 means float (single precision); 2 (the default) means double; 3 means long double; 4 is reserved for quadruple precision. Nearly all the testing has been carried out with doubles and that's the recommended configuration. In order for long double to be used, GEOGRAPHICLIB_HAVE_LONG_DOUBLE needs to be defined. Note that with Microsoft Visual Studio, long double is the same as double.

Definition at line 35 of file Math.hpp.

## GEOGRAPHICLIB_VOLATILE

#define GEOGRAPHICLIB_VOLATILE volatile

Definition at line 64 of file Math.hpp.

Referenced by GeographicLib::Math::AngRound(), GeographicLib::MGRS::Forward(), and GeographicLib::Math::sum().

## GEOGRAPHICLIB_PANIC

#define GEOGRAPHICLIB_PANIC | ( |  | msg | ) |

Value:
false

Definition at line 67 of file Math.hpp.

Referenced by GeographicLib::EllipticFunction::am(), GeographicLib::EllipticFunction::Einv(), GeographicLib::NormalGravity::J2ToFlattening(), GeographicLib::Gnomonic::Reverse(), GeographicLib::EllipticFunction::sncndn(), and GeographicLib::Math::tauf().