LOST  0.0.1
LOST: Open-source Star Tracker
decimal.hpp File Reference
#include <cmath>
#include <string>
Include dependency graph for decimal.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define STR_TO_DECIMAL(x)   std::stod(x)
 
#define DECIMAL(x)   ((decimal) x)
 
#define DECIMAL_M_E   ((decimal) M_E) /* e */
 
#define DECIMAL_M_LOG2E   ((decimal) M_LOG2E) /* log_2 e */
 
#define DECIMAL_M_LOG10E   ((decimal) M_LOG10E) /* log_10 e */
 
#define DECIMAL_M_LN2   ((decimal) M_LN2) /* log_e 2 */
 
#define DECIMAL_M_LN10   ((decimal) M_LN10) /* log_e 10 */
 
#define DECIMAL_M_PI   ((decimal) M_PI) /* pi */
 
#define DECIMAL_M_PI_2   ((decimal) M_PI_2) /* pi/2 */
 
#define DECIMAL_M_PI_4   ((decimal) M_PI_4) /* pi/4 */
 
#define DECIMAL_M_1_PI   ((decimal) M_1_PI) /* 1/pi */
 
#define DECIMAL_M_2_PI   ((decimal) M_2_PI) /* 2/pi */
 
#define DECIMAL_M_2_SQRTPI   ((decimal) M_2_SQRTPI) /* 2/sqrt(pi) */
 
#define DECIMAL_M_SQRT2   ((decimal) M_SQRT2) /* sqrt(2) */
 
#define DECIMAL_M_SQRT1_2   ((decimal) M_SQRT1_2) /* 1/sqrt(2) */
 
#define DECIMAL_POW(base, power)   ((decimal) std::pow(base, power))
 
#define DECIMAL_SQRT(x)   ((decimal) std::sqrt(x))
 
#define DECIMAL_LOG(x)   ((decimal) std::log(x))
 
#define DECIMAL_EXP(x)   ((decimal) std::exp(x))
 
#define DECIMAL_ERF(x)   ((decimal) std::erf(x))
 
#define DECIMAL_ROUND(x)   ((decimal) std::round(x))
 
#define DECIMAL_CEIL(x)   ((decimal) std::ceil(x))
 
#define DECIMAL_FLOOR(x)   ((decimal) std::floor(x))
 
#define DECIMAL_ABS(x)   ((decimal) std::abs(x))
 
#define DECIMAL_SIN(x)   ((decimal) std::sin(x))
 
#define DECIMAL_COS(x)   ((decimal) std::cos(x))
 
#define DECIMAL_TAN(x)   ((decimal) std::tan(x))
 
#define DECIMAL_ASIN(x)   ((decimal) std::asin(x))
 
#define DECIMAL_ACOS(x)   ((decimal) std::acos(x))
 
#define DECIMAL_ATAN(x)   ((decimal) std::atan(x))
 
#define DECIMAL_ATAN2(x, y)   ((decimal) std::atan2(x,y))
 
#define DECIMAL_FMA(x, y, z)   ((decimal) std::fma(x,y,z))
 
#define DECIMAL_HYPOT(x, y)   ((decimal) std::hypot(x,y))
 

Typedefs

typedef double decimal
 

Macro Definition Documentation

◆ DECIMAL

#define DECIMAL (   x)    ((decimal) x)

Definition at line 21 of file decimal.hpp.

◆ DECIMAL_ABS

#define DECIMAL_ABS (   x)    ((decimal) std::abs(x))

Definition at line 49 of file decimal.hpp.

◆ DECIMAL_ACOS

#define DECIMAL_ACOS (   x)    ((decimal) std::acos(x))

Definition at line 56 of file decimal.hpp.

◆ DECIMAL_ASIN

#define DECIMAL_ASIN (   x)    ((decimal) std::asin(x))

Definition at line 55 of file decimal.hpp.

◆ DECIMAL_ATAN

#define DECIMAL_ATAN (   x)    ((decimal) std::atan(x))

Definition at line 57 of file decimal.hpp.

◆ DECIMAL_ATAN2

#define DECIMAL_ATAN2 (   x,
 
)    ((decimal) std::atan2(x,y))

Definition at line 58 of file decimal.hpp.

◆ DECIMAL_CEIL

#define DECIMAL_CEIL (   x)    ((decimal) std::ceil(x))

Definition at line 47 of file decimal.hpp.

◆ DECIMAL_COS

#define DECIMAL_COS (   x)    ((decimal) std::cos(x))

Definition at line 53 of file decimal.hpp.

◆ DECIMAL_ERF

#define DECIMAL_ERF (   x)    ((decimal) std::erf(x))

Definition at line 43 of file decimal.hpp.

◆ DECIMAL_EXP

#define DECIMAL_EXP (   x)    ((decimal) std::exp(x))

Definition at line 42 of file decimal.hpp.

◆ DECIMAL_FLOOR

#define DECIMAL_FLOOR (   x)    ((decimal) std::floor(x))

Definition at line 48 of file decimal.hpp.

◆ DECIMAL_FMA

#define DECIMAL_FMA (   x,
  y,
 
)    ((decimal) std::fma(x,y,z))

Definition at line 61 of file decimal.hpp.

◆ DECIMAL_HYPOT

#define DECIMAL_HYPOT (   x,
 
)    ((decimal) std::hypot(x,y))

Definition at line 62 of file decimal.hpp.

◆ DECIMAL_LOG

#define DECIMAL_LOG (   x)    ((decimal) std::log(x))

Definition at line 41 of file decimal.hpp.

◆ DECIMAL_M_1_PI

#define DECIMAL_M_1_PI   ((decimal) M_1_PI) /* 1/pi */

Definition at line 32 of file decimal.hpp.

◆ DECIMAL_M_2_PI

#define DECIMAL_M_2_PI   ((decimal) M_2_PI) /* 2/pi */

Definition at line 33 of file decimal.hpp.

◆ DECIMAL_M_2_SQRTPI

#define DECIMAL_M_2_SQRTPI   ((decimal) M_2_SQRTPI) /* 2/sqrt(pi) */

Definition at line 34 of file decimal.hpp.

◆ DECIMAL_M_E

#define DECIMAL_M_E   ((decimal) M_E) /* e */

Definition at line 24 of file decimal.hpp.

◆ DECIMAL_M_LN10

#define DECIMAL_M_LN10   ((decimal) M_LN10) /* log_e 10 */

Definition at line 28 of file decimal.hpp.

◆ DECIMAL_M_LN2

#define DECIMAL_M_LN2   ((decimal) M_LN2) /* log_e 2 */

Definition at line 27 of file decimal.hpp.

◆ DECIMAL_M_LOG10E

#define DECIMAL_M_LOG10E   ((decimal) M_LOG10E) /* log_10 e */

Definition at line 26 of file decimal.hpp.

◆ DECIMAL_M_LOG2E

#define DECIMAL_M_LOG2E   ((decimal) M_LOG2E) /* log_2 e */

Definition at line 25 of file decimal.hpp.

◆ DECIMAL_M_PI

#define DECIMAL_M_PI   ((decimal) M_PI) /* pi */

Definition at line 29 of file decimal.hpp.

◆ DECIMAL_M_PI_2

#define DECIMAL_M_PI_2   ((decimal) M_PI_2) /* pi/2 */

Definition at line 30 of file decimal.hpp.

◆ DECIMAL_M_PI_4

#define DECIMAL_M_PI_4   ((decimal) M_PI_4) /* pi/4 */

Definition at line 31 of file decimal.hpp.

◆ DECIMAL_M_SQRT1_2

#define DECIMAL_M_SQRT1_2   ((decimal) M_SQRT1_2) /* 1/sqrt(2) */

Definition at line 36 of file decimal.hpp.

◆ DECIMAL_M_SQRT2

#define DECIMAL_M_SQRT2   ((decimal) M_SQRT2) /* sqrt(2) */

Definition at line 35 of file decimal.hpp.

◆ DECIMAL_POW

#define DECIMAL_POW (   base,
  power 
)    ((decimal) std::pow(base, power))

Definition at line 39 of file decimal.hpp.

◆ DECIMAL_ROUND

#define DECIMAL_ROUND (   x)    ((decimal) std::round(x))

Definition at line 46 of file decimal.hpp.

◆ DECIMAL_SIN

#define DECIMAL_SIN (   x)    ((decimal) std::sin(x))

Definition at line 52 of file decimal.hpp.

◆ DECIMAL_SQRT

#define DECIMAL_SQRT (   x)    ((decimal) std::sqrt(x))

Definition at line 40 of file decimal.hpp.

◆ DECIMAL_TAN

#define DECIMAL_TAN (   x)    ((decimal) std::tan(x))

Definition at line 54 of file decimal.hpp.

◆ STR_TO_DECIMAL

#define STR_TO_DECIMAL (   x)    std::stod(x)

Definition at line 12 of file decimal.hpp.

Typedef Documentation

◆ decimal

typedef double decimal

Definition at line 11 of file decimal.hpp.