C++ Mathematical Expression Toolkit (ExprTk) release
Loading...
Searching...
No Matches
Namespaces | Classes | Functions
cmplx Namespace Reference

Namespaces

namespace  details
 

Classes

struct  complex_t
 

Functions

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

Function Documentation

◆ abs()

complex_t cmplx::abs ( const complex_t  v)
inline

Definition at line 175 of file complex_type.hpp.

175{ return complex_t(std::abs (v.c_)); }
std::complex< double > c_

References cmplx::complex_t::c_.

Referenced by exprtk::details::numeric::details::abs_impl(), equal(), expm1(), log1p(), and nequal().

Here is the caller graph for this function:

◆ acos()

complex_t cmplx::acos ( const complex_t  v)
inline

Definition at line 176 of file complex_type.hpp.

176{ return complex_t(std::acos (v.c_)); }

References cmplx::complex_t::c_.

Referenced by exprtk::details::numeric::details::acos_impl().

Here is the caller graph for this function:

◆ asin()

complex_t cmplx::asin ( const complex_t  v)
inline

Definition at line 177 of file complex_type.hpp.

177{ return complex_t(std::asin (v.c_)); }

References cmplx::complex_t::c_.

Referenced by exprtk::details::numeric::details::asin_impl().

Here is the caller graph for this function:

◆ atan()

complex_t cmplx::atan ( const complex_t  v)
inline

Definition at line 178 of file complex_type.hpp.

178{ return complex_t(std::atan (v.c_)); }

References cmplx::complex_t::c_.

Referenced by exprtk::details::numeric::details::atan_impl().

Here is the caller graph for this function:

◆ atan2()

complex_t cmplx::atan2 ( const complex_t  v0,
const complex_t  v1 
)
inline

Definition at line 209 of file complex_type.hpp.

209{ return complex_t(std::atan2(v0.c_.real(),v0.c_.imag()),std::atan2(v1.c_.real(),v1.c_.imag())); }

References cmplx::complex_t::c_.

Referenced by exprtk::details::numeric::details::atan2_impl().

Here is the caller graph for this function:

◆ ceil()

complex_t cmplx::ceil ( const complex_t  v)
inline

Definition at line 179 of file complex_type.hpp.

179{ return complex_t(std::ceil (v.c_.real()),std::ceil (v.c_.imag())); }

References cmplx::complex_t::c_.

Referenced by exprtk::details::numeric::details::ceil_impl(), round(), and roundn().

Here is the caller graph for this function:

◆ cos()

complex_t cmplx::cos ( const complex_t  v)
inline

Definition at line 180 of file complex_type.hpp.

180{ return complex_t(std::cos (v.c_)); }

References cmplx::complex_t::c_.

Referenced by exprtk::details::numeric::details::cos_impl(), and exprtk::details::numeric::details::sec_impl().

Here is the caller graph for this function:

◆ cosh()

complex_t cmplx::cosh ( const complex_t  v)
inline

Definition at line 181 of file complex_type.hpp.

181{ return complex_t(std::cosh (v.c_)); }

References cmplx::complex_t::c_.

Referenced by exprtk::details::numeric::details::cosh_impl().

Here is the caller graph for this function:

◆ cot()

complex_t cmplx::cot ( const complex_t  v)
inline

Definition at line 194 of file complex_type.hpp.

194{ return complex_t(1.0 / std::tan(v.c_)); }

References cmplx::complex_t::c_.

◆ csc()

complex_t cmplx::csc ( const complex_t  v)
inline

Definition at line 196 of file complex_type.hpp.

196{ return complex_t(1.0 / std::sin(v.c_)); }

References cmplx::complex_t::c_.

◆ d2g()

complex_t cmplx::d2g ( const complex_t  v)
inline

Definition at line 199 of file complex_type.hpp.

199{ return complex_t(v.c_ * (20.0/9.0)); }

References cmplx::complex_t::c_.

◆ d2r()

complex_t cmplx::d2r ( const complex_t  v)
inline

Definition at line 198 of file complex_type.hpp.

198{ return complex_t(v.c_ * details::constant::pi_180.c_ ); }

References cmplx::complex_t::c_, and cmplx::details::constant::pi_180.

◆ equal()

complex_t cmplx::equal ( const complex_t  v0x,
const complex_t  v1x 
)
inline

Definition at line 216 of file complex_type.hpp.

217 {
218 const complex_t v0 = v0x;
219 const complex_t v1 = v1x;
220 static const complex_t epsilon = complex_t(0.0000000001);
221 return (abs(v0 - v1) <= (max(complex_t(1),max(abs(v0),abs(v1))) * epsilon)) ? complex_t(1) : complex_t(0);
222 }
complex_t abs(const complex_t v)
complex_t max(const complex_t v0, const complex_t v1)

References abs(), and max().

Here is the call graph for this function:

◆ erf()

complex_t cmplx::erf ( complex_t  )
inline

Definition at line 310 of file complex_type.hpp.

311 {
312 // Note: Implementation for erf of a complex number is required.
313 // http://ab-initio.mit.edu/Faddeeva.hh
314 return complex_t(0);
315 }

Referenced by erfc().

Here is the caller graph for this function:

◆ erfc()

complex_t cmplx::erfc ( complex_t  v)
inline

Definition at line 317 of file complex_type.hpp.

318 {
319 return complex_t(1) - erf(v);
320 }
complex_t erf(complex_t)

References erf().

Here is the call graph for this function:

◆ exp()

complex_t cmplx::exp ( const complex_t  v)
inline

Definition at line 182 of file complex_type.hpp.

182{ return complex_t(std::exp (v.c_)); }

References cmplx::complex_t::c_.

Referenced by exprtk::details::numeric::details::exp_impl(), and expm1().

Here is the caller graph for this function:

◆ expm1()

complex_t cmplx::expm1 ( const complex_t  vx)
inline

Definition at line 224 of file complex_type.hpp.

225 {
226 const complex_t v = vx;
227 if (abs(v) < complex_t(0.00001))
228 return complex_t(v + (0.5 * v * v));
229 else
230 return complex_t(exp(v) - complex_t(1));
231 }
complex_t exp(const complex_t v)

References abs(), and exp().

Here is the call graph for this function:

◆ floor()

complex_t cmplx::floor ( const complex_t  v)
inline

Definition at line 183 of file complex_type.hpp.

183{ return complex_t(std::floor(v.c_.real()),std::floor(v.c_.imag())); }

References cmplx::complex_t::c_.

Referenced by exprtk::details::numeric::details::floor_impl(), round(), and roundn().

Here is the caller graph for this function:

◆ frac()

complex_t cmplx::frac ( const complex_t  v)
inline

Definition at line 202 of file complex_type.hpp.

202{ return complex_t(v.c_.real() - static_cast<long long>(v.c_.real())); }

References cmplx::complex_t::c_.

Referenced by exprtk::details::numeric::details::frac_impl().

Here is the caller graph for this function:

◆ g2d()

complex_t cmplx::g2d ( const complex_t  v)
inline

Definition at line 200 of file complex_type.hpp.

200{ return complex_t(v.c_ * (9.0/20.0)); }

References cmplx::complex_t::c_.

◆ hypot()

complex_t cmplx::hypot ( const complex_t  v0,
const complex_t  v1 
)
inline

Definition at line 268 of file complex_type.hpp.

269 {
270 return sqrt((v0 * v0) + (v1 * v1));
271 }
complex_t sqrt(const complex_t v)

References sqrt().

Here is the call graph for this function:

◆ is_false()

bool cmplx::is_false ( const complex_t  v)
inline

Definition at line 214 of file complex_type.hpp.

214{ return (v == complex_t(0)); }

Referenced by exprtk::details::is_false(), nand(), and nor().

Here is the caller graph for this function:

◆ is_true()

bool cmplx::is_true ( const complex_t  v)
inline

Definition at line 213 of file complex_type.hpp.

213{ return (v != complex_t(0)); }

References is_true().

Referenced by exprtk::details::is_true(), is_true(), and xnor().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ log()

complex_t cmplx::log ( const complex_t  v)
inline

Definition at line 184 of file complex_type.hpp.

184{ return complex_t(std::log (v.c_)); }

References cmplx::complex_t::c_.

Referenced by exprtk::details::numeric::details::acosh_impl(), exprtk::details::numeric::details::asinh_impl(), exprtk::details::numeric::details::atanh_impl(), log1p(), exprtk::details::numeric::details::log2_impl(), and exprtk::details::numeric::details::log_impl().

Here is the caller graph for this function:

◆ log10()

complex_t cmplx::log10 ( const complex_t  v)
inline

Definition at line 185 of file complex_type.hpp.

185{ return complex_t(std::log10(v.c_)); }

References cmplx::complex_t::c_.

Referenced by exprtk::details::numeric::details::log10_impl().

Here is the caller graph for this function:

◆ log1p()

complex_t cmplx::log1p ( const complex_t  v)
inline

Definition at line 239 of file complex_type.hpp.

240 {
241 if (v > complex_t(-1))
242 {
243 if (abs(v) > complex_t(0.0001))
244 {
245 return log(complex_t(1) + v);
246 }
247 else
248 return (complex_t(-0.5) * v + complex_t(1)) * v;
249 }
250 else
251 return complex_t(std::numeric_limits<double>::quiet_NaN());
252 }
complex_t log(const complex_t v)
cmplx::complex_t complex_t

References abs(), and log().

Here is the call graph for this function:

◆ log2()

complex_t cmplx::log2 ( const complex_t  v)
inline

Definition at line 186 of file complex_type.hpp.

186{ return complex_t(std::log(v.c_) / details::constant::log2.c_); }

References cmplx::complex_t::c_, and cmplx::details::constant::log2.

◆ logn()

complex_t cmplx::logn ( const complex_t  v0,
const complex_t  v1 
)
inline

Definition at line 207 of file complex_type.hpp.

207{ return complex_t(std::log(v0.c_) / std::log(v1.c_)); }

References cmplx::complex_t::c_.

◆ max()

complex_t cmplx::max ( const complex_t  v0,
const complex_t  v1 
)
inline

Definition at line 210 of file complex_type.hpp.

210{ return complex_t(v0 > v1 ? v0.c_ : v1.c_); }

References cmplx::complex_t::c_.

Referenced by equal(), and nequal().

Here is the caller graph for this function:

◆ min()

complex_t cmplx::min ( const complex_t  v0,
const complex_t  v1 
)
inline

Definition at line 211 of file complex_type.hpp.

211{ return complex_t(v0 < v1 ? v0.c_ : v1.c_); }

References cmplx::complex_t::c_.

◆ modulus()

complex_t cmplx::modulus ( const complex_t  v0,
const complex_t  v1 
)
inline

Definition at line 205 of file complex_type.hpp.

205{ return complex_t(fmod(v0.c_.real() , v1.c_.real()),fmod(v0.c_.imag() , v1.c_.imag())); }

References cmplx::complex_t::c_.

◆ nand()

complex_t cmplx::nand ( const complex_t  v0,
const complex_t v1 
)
inline

Definition at line 290 of file complex_type.hpp.

291 {
292 return (is_false(v0) || is_false(v1)) ? complex_t(1) : complex_t(0);
293 }
bool is_false(const complex_t v)

References is_false().

Here is the call graph for this function:

◆ neg()

complex_t cmplx::neg ( const complex_t  v)
inline

Definition at line 187 of file complex_type.hpp.

187{ return complex_t(-1.0 * v.c_); }

References cmplx::complex_t::c_.

◆ nequal()

complex_t cmplx::nequal ( const complex_t  v0,
const complex_t  v1 
)
inline

Definition at line 233 of file complex_type.hpp.

234 {
235 static const complex_t epsilon = complex_t(0.0000000001);
236 return (abs(v0 - v1) > (max(complex_t(1),max(abs(v0),abs(v1))) * epsilon)) ? complex_t(1) : complex_t(0);
237 }

References abs(), and max().

Here is the call graph for this function:

◆ nor()

complex_t cmplx::nor ( const complex_t  v0,
const complex_t v1 
)
inline

Definition at line 295 of file complex_type.hpp.

296 {
297 return (is_false(v0) && is_false(v1)) ? complex_t(1) : complex_t(0);
298 }

References is_false().

Here is the call graph for this function:

◆ notl()

complex_t cmplx::notl ( const complex_t  v)
inline

Definition at line 201 of file complex_type.hpp.

201{ return complex_t(v != complex_t(0) ? complex_t(0) : complex_t(1)); }

◆ operator!=()

bool cmplx::operator!= ( const double &  r0,
const complex_t r1 
)
inline

Definition at line 109 of file complex_type.hpp.

◆ operator*() [1/3]

complex_t cmplx::operator* ( const complex_t r0,
const double &  r1 
)
inline

Definition at line 109 of file complex_type.hpp.

◆ operator*() [2/3]

complex_t cmplx::operator* ( const complex_t  r0,
const complex_t  r1 
)
inline

Definition at line 88 of file complex_type.hpp.

88{ return complex_t(r0.c_ * r1.c_); }

References cmplx::complex_t::c_.

◆ operator*() [3/3]

complex_t cmplx::operator* ( const double &  r0,
const complex_t r1 
)
inline

Definition at line 109 of file complex_type.hpp.

◆ operator+() [1/3]

complex_t cmplx::operator+ ( const complex_t r0,
const double &  r1 
)
inline

Definition at line 109 of file complex_type.hpp.

◆ operator+() [2/3]

complex_t cmplx::operator+ ( const complex_t  r0,
const complex_t  r1 
)
inline

Definition at line 86 of file complex_type.hpp.

86{ return complex_t(r0.c_ + r1.c_); }

References cmplx::complex_t::c_.

◆ operator+() [3/3]

complex_t cmplx::operator+ ( const double &  r0,
const complex_t r1 
)
inline

Definition at line 109 of file complex_type.hpp.

◆ operator-() [1/3]

complex_t cmplx::operator- ( const complex_t r0,
const double &  r1 
)
inline

Definition at line 109 of file complex_type.hpp.

◆ operator-() [2/3]

complex_t cmplx::operator- ( const complex_t  r0,
const complex_t  r1 
)
inline

Definition at line 87 of file complex_type.hpp.

87{ return complex_t(r0.c_ - r1.c_); }

References cmplx::complex_t::c_.

◆ operator-() [3/3]

complex_t cmplx::operator- ( const double &  r0,
const complex_t r1 
)
inline

Definition at line 109 of file complex_type.hpp.

◆ operator/() [1/3]

complex_t cmplx::operator/ ( const complex_t r0,
const double &  r1 
)
inline

Definition at line 109 of file complex_type.hpp.

◆ operator/() [2/3]

complex_t cmplx::operator/ ( const complex_t  r0,
const complex_t  r1 
)
inline

Definition at line 89 of file complex_type.hpp.

89{ return complex_t(r0.c_ / r1.c_); }

References cmplx::complex_t::c_.

◆ operator/() [3/3]

complex_t cmplx::operator/ ( const double &  r0,
const complex_t r1 
)
inline

Definition at line 109 of file complex_type.hpp.

◆ operator<()

bool cmplx::operator< ( const complex_t  c0,
const complex_t  c1 
)
inline

Definition at line 92 of file complex_type.hpp.

92{ return std::arg(c0.c_) < std::arg(c1.c_); }

References cmplx::complex_t::c_.

◆ operator<=()

bool cmplx::operator<= ( const complex_t  c0,
const complex_t  c1 
)
inline

Definition at line 94 of file complex_type.hpp.

94{ return std::arg(c0.c_) <= std::arg(c1.c_); }

References cmplx::complex_t::c_.

◆ operator==()

bool cmplx::operator== ( const double &  r0,
const complex_t r1 
)
inline

Definition at line 109 of file complex_type.hpp.

◆ operator>()

bool cmplx::operator> ( const complex_t  c0,
const complex_t  c1 
)
inline

Definition at line 93 of file complex_type.hpp.

93{ return std::arg(c0.c_) > std::arg(c1.c_); }

References cmplx::complex_t::c_.

◆ operator>=()

bool cmplx::operator>= ( const complex_t  c0,
const complex_t  c1 
)
inline

Definition at line 95 of file complex_type.hpp.

95{ return std::arg(c0.c_) >= std::arg(c1.c_); }

References cmplx::complex_t::c_.

◆ pos()

complex_t cmplx::pos ( const complex_t  v)
inline

Definition at line 188 of file complex_type.hpp.

188{ return v; }

◆ pow()

complex_t cmplx::pow ( const complex_t  v0,
const complex_t  v1 
)
inline

Definition at line 206 of file complex_type.hpp.

206{ return complex_t(std::pow(v0.c_,v1.c_) ); }

References cmplx::complex_t::c_.

Referenced by exprtk::details::numeric::details::pow_impl(), root(), roundn(), shl(), and shr().

Here is the caller graph for this function:

◆ r2d()

complex_t cmplx::r2d ( const complex_t  v)
inline

Definition at line 197 of file complex_type.hpp.

197{ return complex_t(v.c_ * details::constant::_180_pi.c_); }

References cmplx::details::constant::_180_pi, and cmplx::complex_t::c_.

◆ root()

complex_t cmplx::root ( const complex_t  v0,
const complex_t  v1 
)
inline

Definition at line 208 of file complex_type.hpp.

208{ return pow(v0,complex_t(1.0) / v1); }
complex_t pow(const complex_t v0, const complex_t v1)

References pow().

Here is the call graph for this function:

◆ round()

complex_t cmplx::round ( const complex_t  v)
inline

Definition at line 254 of file complex_type.hpp.

255 {
256 return ((v < complex_t(0)) ? ceil(v - complex_t(0.5)) : floor(v + complex_t(0.5)));
257 }
complex_t floor(const complex_t v)
complex_t ceil(const complex_t v)

References ceil(), and floor().

Here is the call graph for this function:

◆ roundn()

complex_t cmplx::roundn ( const complex_t  v0,
const complex_t  v1 
)
inline

Definition at line 259 of file complex_type.hpp.

260 {
261 const complex_t p10 = pow(complex_t(10),trunc(v1));
262 if (v0 < complex_t(0))
263 return complex_t(ceil ((v0 * p10) - complex_t(0.5)) / p10);
264 else
265 return complex_t(floor((v0 * p10) + complex_t(0.5)) / p10);
266 }
complex_t trunc(const complex_t v)

References ceil(), floor(), pow(), and trunc().

Here is the call graph for this function:

◆ sec()

complex_t cmplx::sec ( const complex_t  v)
inline

Definition at line 195 of file complex_type.hpp.

195{ return complex_t(1.0 / std::cos(v.c_)); }

References cmplx::complex_t::c_.

◆ sgn()

complex_t cmplx::sgn ( const complex_t  v)
inline

Definition at line 283 of file complex_type.hpp.

284 {
285 if (v > complex_t(0)) return complex_t(+1);
286 else if (v < complex_t(0)) return complex_t(-1);
287 else return complex_t( 0);
288 }

◆ shl()

complex_t cmplx::shl ( const complex_t  v0,
const complex_t  v1 
)
inline

Definition at line 278 of file complex_type.hpp.

279 {
280 return v0 * pow(complex_t(2),trunc(v1));
281 }

References pow(), and trunc().

Here is the call graph for this function:

◆ shr()

complex_t cmplx::shr ( const complex_t  v0,
const complex_t  v1 
)
inline

Definition at line 273 of file complex_type.hpp.

274 {
275 return v0 * (complex_t(1) / pow(complex_t(2),trunc(v1)));
276 }

References pow(), and trunc().

Here is the call graph for this function:

◆ sin()

complex_t cmplx::sin ( const complex_t  v)
inline

Definition at line 189 of file complex_type.hpp.

189{ return complex_t(std::sin (v.c_)); }

References cmplx::complex_t::c_.

Referenced by exprtk::details::numeric::details::csc_impl(), and exprtk::details::numeric::details::sin_impl().

Here is the caller graph for this function:

◆ sinh()

complex_t cmplx::sinh ( const complex_t  v)
inline

Definition at line 190 of file complex_type.hpp.

190{ return complex_t(std::sinh (v.c_)); }

References cmplx::complex_t::c_.

Referenced by exprtk::details::numeric::details::sinh_impl().

Here is the caller graph for this function:

◆ sqrt()

complex_t cmplx::sqrt ( const complex_t  v)
inline

Definition at line 191 of file complex_type.hpp.

191{ return complex_t(std::sqrt (v.c_)); }

References cmplx::complex_t::c_.

Referenced by exprtk::details::numeric::details::acosh_impl(), exprtk::details::numeric::details::asinh_impl(), hypot(), and exprtk::details::numeric::details::sqrt_impl().

Here is the caller graph for this function:

◆ tan()

complex_t cmplx::tan ( const complex_t  v)
inline

Definition at line 192 of file complex_type.hpp.

192{ return complex_t(std::tan (v.c_)); }

References cmplx::complex_t::c_.

Referenced by exprtk::details::numeric::details::cot_impl(), and exprtk::details::numeric::details::tan_impl().

Here is the caller graph for this function:

◆ tanh()

complex_t cmplx::tanh ( const complex_t  v)
inline

Definition at line 193 of file complex_type.hpp.

193{ return complex_t(std::tanh (v.c_)); }

References cmplx::complex_t::c_.

Referenced by exprtk::details::numeric::details::tanh_impl().

Here is the caller graph for this function:

◆ trunc()

complex_t cmplx::trunc ( const complex_t  v)
inline

Definition at line 203 of file complex_type.hpp.

203{ return complex_t((double)static_cast<long long>(v.c_.real())); }

References cmplx::complex_t::c_.

Referenced by roundn(), shl(), shr(), and exprtk::details::numeric::details::trunc_impl().

Here is the caller graph for this function:

◆ xnor()

complex_t cmplx::xnor ( const complex_t  v0,
const complex_t v1 
)
inline

Definition at line 300 of file complex_type.hpp.

301 {
302 const bool v0_true = is_true(v0);
303 const bool v1_true = is_true(v1);
304 if ((v0_true && v1_true) || (!v0_true && !v1_true))
305 return complex_t(1);
306 else
307 return complex_t(0);
308 }
bool is_true(const complex_t v)

References is_true().

Here is the call graph for this function: