FOUND
Loading...
Searching...
No Matches
decimal.hpp File Reference
#include <cmath>
#include <string>
#include <limits>
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)   (static_cast<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_M_R_E   (DECIMAL(6371008.7714)) /* Earth's Radius */
 
#define DECIMAL_INF   (DECIMAL(INFINITY)) /* Infinity */
 
#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)    (static_cast<decimal>(x))

◆ DECIMAL_ABS

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

◆ DECIMAL_ACOS

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

◆ DECIMAL_ASIN

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

◆ DECIMAL_ATAN

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

◆ DECIMAL_ATAN2

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

◆ DECIMAL_CEIL

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

◆ DECIMAL_COS

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

◆ DECIMAL_ERF

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

◆ DECIMAL_EXP

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

◆ DECIMAL_FLOOR

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

◆ DECIMAL_FMA

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

◆ DECIMAL_HYPOT

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

◆ DECIMAL_INF

#define DECIMAL_INF   (DECIMAL(INFINITY)) /* Infinity */

◆ DECIMAL_LOG

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

◆ DECIMAL_M_1_PI

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

◆ DECIMAL_M_2_PI

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

◆ DECIMAL_M_2_SQRTPI

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

◆ DECIMAL_M_E

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

◆ DECIMAL_M_LN10

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

◆ DECIMAL_M_LN2

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

◆ DECIMAL_M_LOG10E

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

◆ DECIMAL_M_LOG2E

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

◆ DECIMAL_M_PI

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

◆ DECIMAL_M_PI_2

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

◆ DECIMAL_M_PI_4

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

◆ DECIMAL_M_R_E

#define DECIMAL_M_R_E   (DECIMAL(6371008.7714)) /* Earth's Radius */

◆ DECIMAL_M_SQRT1_2

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

◆ DECIMAL_M_SQRT2

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

◆ DECIMAL_POW

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

◆ DECIMAL_ROUND

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

◆ DECIMAL_SIN

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

◆ DECIMAL_SQRT

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

◆ DECIMAL_TAN

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

◆ STR_TO_DECIMAL

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

Typedef Documentation

◆ decimal

typedef double decimal