C++ Mathematical Expression Toolkit (ExprTk) release
Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Functions | Variables
real_type.hpp File Reference
#include <cmath>
#include <algorithm>
#include <limits>
Include dependency graph for real_type.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  real::type
 
class  std::numeric_limits< real::type >
 

Namespaces

namespace  real
 
namespace  std
 
namespace  real::details
 
namespace  real::details::constant
 

Macros

#define real_define_inequalities(Type)
 

Functions

type real::operator+ (const type r0, const type r1)
 
type real::operator- (const type r0, const type r1)
 
type real::operator* (const type r0, const type r1)
 
type real::operator/ (const type r0, const type r1)
 
bool real::operator< (const type r0, const type r1)
 
bool real::operator> (const type r0, const type r1)
 
bool real::operator<= (const type r0, const type r1)
 
bool real::operator>= (const type r0, const type r1)
 
type real::operator+ (const double r0, const type r1)
 
type real::operator- (const double r0, const type r1)
 
type real::operator* (const double r0, const type r1)
 
type real::operator/ (const double r0, const type r1)
 
bool real::operator< (const double r0, const type r1)
 
bool real::operator> (const double r0, const type r1)
 
bool real::operator<= (const double r0, const type r1)
 
bool real::operator>= (const double r0, const type r1)
 
bool real::operator== (const double r0, const type r1)
 
bool real::operator!= (const double r0, const type r1)
 
type real::operator+ (const type r0, const double r1)
 
type real::operator- (const type r0, const double r1)
 
type real::operator* (const type r0, const double r1)
 
type real::operator/ (const type r0, const double r1)
 
bool real::operator< (const type r0, const double r1)
 
bool real::operator> (const type r0, const double r1)
 
bool real::operator<= (const type r0, const double r1)
 
bool real::operator>= (const type r0, const double r1)
 
bool real::operator== (const type r0, const double r1)
 
bool real::operator!= (const type r0, const double r1)
 
type real::operator+ (const float r0, const type r1)
 
type real::operator- (const float r0, const type r1)
 
type real::operator* (const float r0, const type r1)
 
type real::operator/ (const float r0, const type r1)
 
bool real::operator< (const float r0, const type r1)
 
bool real::operator> (const float r0, const type r1)
 
bool real::operator<= (const float r0, const type r1)
 
bool real::operator>= (const float r0, const type r1)
 
bool real::operator== (const float r0, const type r1)
 
bool real::operator!= (const float r0, const type r1)
 
type real::operator+ (const type r0, const float r1)
 
type real::operator- (const type r0, const float r1)
 
type real::operator* (const type r0, const float r1)
 
type real::operator/ (const type r0, const float r1)
 
bool real::operator< (const type r0, const float r1)
 
bool real::operator> (const type r0, const float r1)
 
bool real::operator<= (const type r0, const float r1)
 
bool real::operator>= (const type r0, const float r1)
 
bool real::operator== (const type r0, const float r1)
 
bool real::operator!= (const type r0, const float r1)
 
type real::operator+ (const int r0, const type r1)
 
type real::operator- (const int r0, const type r1)
 
type real::operator* (const int r0, const type r1)
 
type real::operator/ (const int r0, const type r1)
 
bool real::operator< (const int r0, const type r1)
 
bool real::operator> (const int r0, const type r1)
 
bool real::operator<= (const int r0, const type r1)
 
bool real::operator>= (const int r0, const type r1)
 
bool real::operator== (const int r0, const type r1)
 
bool real::operator!= (const int r0, const type r1)
 
type real::operator+ (const type r0, const int r1)
 
type real::operator- (const type r0, const int r1)
 
type real::operator* (const type r0, const int r1)
 
type real::operator/ (const type r0, const int r1)
 
bool real::operator< (const type r0, const int r1)
 
bool real::operator> (const type r0, const int r1)
 
bool real::operator<= (const type r0, const int r1)
 
bool real::operator>= (const type r0, const int r1)
 
bool real::operator== (const type r0, const int r1)
 
bool real::operator!= (const type r0, const int r1)
 
type real::operator+ (const long long r0, const type r1)
 
type real::operator- (const long long r0, const type r1)
 
type real::operator* (const long long r0, const type r1)
 
type real::operator/ (const long long r0, const type r1)
 
bool real::operator< (const long long r0, const type r1)
 
bool real::operator> (const long long r0, const type r1)
 
bool real::operator<= (const long long r0, const type r1)
 
bool real::operator>= (const long long r0, const type r1)
 
bool real::operator== (const long long r0, const type r1)
 
bool real::operator!= (const long long r0, const type r1)
 
type real::operator+ (const type r0, const long long r1)
 
type real::operator- (const type r0, const long long r1)
 
type real::operator* (const type r0, const long long r1)
 
type real::operator/ (const type r0, const long long r1)
 
bool real::operator< (const type r0, const long long r1)
 
bool real::operator> (const type r0, const long long r1)
 
bool real::operator<= (const type r0, const long long r1)
 
bool real::operator>= (const type r0, const long long r1)
 
bool real::operator== (const type r0, const long long r1)
 
bool real::operator!= (const type r0, const long long r1)
 
type real::operator+ (const unsigned int r0, const type r1)
 
type real::operator- (const unsigned int r0, const type r1)
 
type real::operator* (const unsigned int r0, const type r1)
 
type real::operator/ (const unsigned int r0, const type r1)
 
bool real::operator< (const unsigned int r0, const type r1)
 
bool real::operator> (const unsigned int r0, const type r1)
 
bool real::operator<= (const unsigned int r0, const type r1)
 
bool real::operator>= (const unsigned int r0, const type r1)
 
bool real::operator== (const unsigned int r0, const type r1)
 
bool real::operator!= (const unsigned int r0, const type r1)
 
type real::operator+ (const type r0, const unsigned int r1)
 
type real::operator- (const type r0, const unsigned int r1)
 
type real::operator* (const type r0, const unsigned int r1)
 
type real::operator/ (const type r0, const unsigned int r1)
 
bool real::operator< (const type r0, const unsigned int r1)
 
bool real::operator> (const type r0, const unsigned int r1)
 
bool real::operator<= (const type r0, const unsigned int r1)
 
bool real::operator>= (const type r0, const unsigned int r1)
 
bool real::operator== (const type r0, const unsigned int r1)
 
bool real::operator!= (const type r0, const unsigned int r1)
 
type real::operator+ (const unsigned long long r0, const type r1)
 
type real::operator- (const unsigned long long r0, const type r1)
 
type real::operator* (const unsigned long long r0, const type r1)
 
type real::operator/ (const unsigned long long r0, const type r1)
 
bool real::operator< (const unsigned long long r0, const type r1)
 
bool real::operator> (const unsigned long long r0, const type r1)
 
bool real::operator<= (const unsigned long long r0, const type r1)
 
bool real::operator>= (const unsigned long long r0, const type r1)
 
bool real::operator== (const unsigned long long r0, const type r1)
 
bool real::operator!= (const unsigned long long r0, const type r1)
 
type real::operator+ (const type r0, const unsigned long long r1)
 
type real::operator- (const type r0, const unsigned long long r1)
 
type real::operator* (const type r0, const unsigned long long r1)
 
type real::operator/ (const type r0, const unsigned long long r1)
 
bool real::operator< (const type r0, const unsigned long long r1)
 
bool real::operator> (const type r0, const unsigned long long r1)
 
bool real::operator<= (const type r0, const unsigned long long r1)
 
bool real::operator>= (const type r0, const unsigned long long r1)
 
bool real::operator== (const type r0, const unsigned long long r1)
 
bool real::operator!= (const type r0, const unsigned long long r1)
 
type real::operator+ (const unsigned long int r0, const type r1)
 
type real::operator- (const unsigned long int r0, const type r1)
 
type real::operator* (const unsigned long int r0, const type r1)
 
type real::operator/ (const unsigned long int r0, const type r1)
 
bool real::operator< (const unsigned long int r0, const type r1)
 
bool real::operator> (const unsigned long int r0, const type r1)
 
bool real::operator<= (const unsigned long int r0, const type r1)
 
bool real::operator>= (const unsigned long int r0, const type r1)
 
bool real::operator== (const unsigned long int r0, const type r1)
 
bool real::operator!= (const unsigned long int r0, const type r1)
 
type real::operator+ (const type r0, const unsigned long int r1)
 
type real::operator- (const type r0, const unsigned long int r1)
 
type real::operator* (const type r0, const unsigned long int r1)
 
type real::operator/ (const type r0, const unsigned long int r1)
 
bool real::operator< (const type r0, const unsigned long int r1)
 
bool real::operator> (const type r0, const unsigned long int r1)
 
bool real::operator<= (const type r0, const unsigned long int r1)
 
bool real::operator>= (const type r0, const unsigned long int r1)
 
bool real::operator== (const type r0, const unsigned long int r1)
 
bool real::operator!= (const type r0, const unsigned long int r1)
 
type real::abs (const type v)
 
type real::acos (const type v)
 
type real::acosh (const type v)
 
type real::asin (const type v)
 
type real::asinh (const type v)
 
type real::atan (const type v)
 
type real::atanh (const type v)
 
type real::ceil (const type v)
 
type real::cos (const type v)
 
type real::cosh (const type v)
 
type real::exp (const type v)
 
type real::floor (const type v)
 
type real::log (const type v)
 
type real::log10 (const type v)
 
type real::log2 (const type v)
 
type real::neg (const type v)
 
type real::pos (const type v)
 
type real::sin (const type v)
 
type real::sinh (const type v)
 
type real::sqrt (const type v)
 
type real::tan (const type v)
 
type real::tanh (const type v)
 
type real::cot (const type v)
 
type real::sec (const type v)
 
type real::csc (const type v)
 
type real::r2d (const type v)
 
type real::d2r (const type v)
 
type real::d2g (const type v)
 
type real::g2d (const type v)
 
type real::notl (const type v)
 
type real::frac (const type v)
 
type real::trunc (const type v)
 
type real::modulus (const type v0, const type v1)
 
type real::pow (const type v0, const type v1)
 
type real::logn (const type v0, const type v1)
 
type real::root (const type v0, const type v1)
 
type real::atan2 (const type v0, const type v1)
 
type real::max (const type v0, const type v1)
 
type real::min (const type v0, const type v1)
 
bool real::is_true (const type v)
 
bool real::is_false (const type v)
 
type real::equal (const type v0x, const type v1x)
 
type real::expm1 (const type vx)
 
type real::nequal (const type v0, const type v1)
 
type real::log1p (const type v)
 
type real::round (const type v)
 
type real::roundn (const type v0, const type v1)
 
type real::hypot (const type v0, const type v1)
 
type real::shr (const type v0, const type v1)
 
type real::shl (const type v0, const type v1)
 
type real::sgn (const type v)
 
type real::nand (const type v0, const type &v1)
 
type real::nor (const type v0, const type &v1)
 
type real::xnor (const type v0, const type &v1)
 
type real::erf (type v)
 
type real::erfc (type v)
 

Variables

static const double real::details::constant::e = 2.71828182845904523536028747135266249775724709369996
 
static const double real::details::constant::pi = 3.14159265358979323846264338327950288419716939937510
 
static const double real::details::constant::pi_2 = 1.57079632679489661923132169163975144209858469968755
 
static const double real::details::constant::pi_4 = 0.78539816339744830961566084581987572104929234984378
 
static const double real::details::constant::pi_180 = 0.01745329251994329576923690768488612713442871888542
 
static const double real::details::constant::_1_pi = 0.31830988618379067153776752674502872406891929148091
 
static const double real::details::constant::_2_pi = 0.63661977236758134307553505349005744813783858296183
 
static const double real::details::constant::_180_pi = 57.29577951308232087679815481410517033240547246656443
 
static const double real::details::constant::log2 = 0.69314718055994530941723212145817656807550013436026
 
static const double real::details::constant::sqrt2 = 1.41421356237309504880168872420969807856967187537695
 

Macro Definition Documentation

◆ real_define_inequalities

#define real_define_inequalities (   Type)
Value:
inline type operator+ (const Type/*&*/ r0, const type/*&*/ r1) { return type(r0 + r1.d_); } \
inline type operator- (const Type/*&*/ r0, const type/*&*/ r1) { return type(r0 - r1.d_); } \
inline type operator* (const Type/*&*/ r0, const type/*&*/ r1) { return type(r0 * r1.d_); } \
inline type operator/ (const Type/*&*/ r0, const type/*&*/ r1) { return type(r0 / r1.d_); } \
inline bool operator< (const Type/*&*/ r0, const type/*&*/ r1) { return (r0 < r1.d_); } \
inline bool operator> (const Type/*&*/ r0, const type/*&*/ r1) { return (r0 > r1.d_); } \
inline bool operator<=(const Type/*&*/ r0, const type/*&*/ r1) { return (r0 <= r1.d_); } \
inline bool operator>=(const Type/*&*/ r0, const type/*&*/ r1) { return (r0 >= r1.d_); } \
inline bool operator==(const Type/*&*/ r0, const type/*&*/ r1) { return (r0 == r1.d_); } \
inline bool operator!=(const Type/*&*/ r0, const type/*&*/ r1) { return (r0 != r1.d_); } \
inline type operator+ (const type/*&*/ r0, const Type/*&*/ r1) { return type(r0.d_ + r1); } \
inline type operator- (const type/*&*/ r0, const Type/*&*/ r1) { return type(r0.d_ - r1); } \
inline type operator* (const type/*&*/ r0, const Type/*&*/ r1) { return type(r0.d_ * r1); } \
inline type operator/ (const type/*&*/ r0, const Type/*&*/ r1) { return type(r0.d_ / r1); } \
inline bool operator< (const type/*&*/ r0, const Type/*&*/ r1) { return (r0.d_ < r1); } \
inline bool operator> (const type/*&*/ r0, const Type/*&*/ r1) { return (r0.d_ > r1); } \
inline bool operator<=(const type/*&*/ r0, const Type/*&*/ r1) { return (r0.d_ <= r1); } \
inline bool operator>=(const type/*&*/ r0, const Type/*&*/ r1) { return (r0.d_ >= r1); } \
inline bool operator==(const type/*&*/ r0, const Type/*&*/ r1) { return (r0.d_ == r1); } \
inline bool operator!=(const type/*&*/ r0, const Type/*&*/ r1) { return (r0.d_ != r1); } \
bool operator<=(const complex_t c0, const complex_t c1)
bool operator>=(const complex_t c0, const complex_t c1)
bool operator!=(const double &r0, const complex_t &r1)
bool operator==(const double &r0, const complex_t &r1)

Definition at line 95 of file real_type.hpp.

96 { return type(r0 + r1.d_); } \
97 inline type operator- (const Type/*&*/ r0, const type/*&*/ r1) { return type(r0 - r1.d_); } \
98 inline type operator* (const Type/*&*/ r0, const type/*&*/ r1) { return type(r0 * r1.d_); } \
99 inline type operator/ (const Type/*&*/ r0, const type/*&*/ r1) { return type(r0 / r1.d_); } \
100 inline bool operator< (const Type/*&*/ r0, const type/*&*/ r1) { return (r0 < r1.d_); } \
101 inline bool operator> (const Type/*&*/ r0, const type/*&*/ r1) { return (r0 > r1.d_); } \
102 inline bool operator<=(const Type/*&*/ r0, const type/*&*/ r1) { return (r0 <= r1.d_); } \
103 inline bool operator>=(const Type/*&*/ r0, const type/*&*/ r1) { return (r0 >= r1.d_); } \
104 inline bool operator==(const Type/*&*/ r0, const type/*&*/ r1) { return (r0 == r1.d_); } \
105 inline bool operator!=(const Type/*&*/ r0, const type/*&*/ r1) { return (r0 != r1.d_); } \
106 inline type operator+ (const type/*&*/ r0, const Type/*&*/ r1) { return type(r0.d_ + r1); } \
107 inline type operator- (const type/*&*/ r0, const Type/*&*/ r1) { return type(r0.d_ - r1); } \
108 inline type operator* (const type/*&*/ r0, const Type/*&*/ r1) { return type(r0.d_ * r1); } \
109 inline type operator/ (const type/*&*/ r0, const Type/*&*/ r1) { return type(r0.d_ / r1); } \
110 inline bool operator< (const type/*&*/ r0, const Type/*&*/ r1) { return (r0.d_ < r1); } \
111 inline bool operator> (const type/*&*/ r0, const Type/*&*/ r1) { return (r0.d_ > r1); } \
112 inline bool operator<=(const type/*&*/ r0, const Type/*&*/ r1) { return (r0.d_ <= r1); } \
113 inline bool operator>=(const type/*&*/ r0, const Type/*&*/ r1) { return (r0.d_ >= r1); } \
114 inline bool operator==(const type/*&*/ r0, const Type/*&*/ r1) { return (r0.d_ == r1); } \
115 inline bool operator!=(const type/*&*/ r0, const Type/*&*/ r1) { return (r0.d_ != r1); } \
116