25#ifndef _CXSC_L_COMPLEX_HPP_INCLUDED
26#define _CXSC_L_COMPLEX_HPP_INCLUDED
64 { re = lr; im = 0;
return *
this; }
67 { re = r; im = 0;
return *
this; }
70 { re =
Re(c); im =
Im(c);
return *
this; }
73 { re = d; im = 0.0;
return *
this; }
290 const real&)
noexcept;
333friend inline bool operator! (
const l_complex &)
noexcept;
406 const l_real & b)
noexcept;
409 const real & b)
noexcept;
470 skipeolnflag = inpdotflag =
true;
471 c = skipwhitespacessinglechar (s,
'(');
477 skipeolnflag = inpdotflag =
true;
478 c = skipwhitespacessinglechar (s,
',');
479 if (inpdotflag) s.putback(c);
481 s >> a.im >> RestoreOpt;
485 skipeolnflag =
false, inpdotflag =
true;
486 c = skipwhitespaces (s);
487 if (inpdotflag && c !=
')')
498 s = skipwhitespacessinglechar (s,
'(');
499 s >> SaveOpt >> a.re;
500 s = skipwhitespacessinglechar (s,
',');
501 s >> a.im >> RestoreOpt;
502 s = skipwhitespaces (s);
511inline l_complex _l_complex(
const l_real &a)
noexcept
512 {
return l_complex(a); }
513inline l_complex _l_complex(
const l_real &a,
const l_real &b)
514 noexcept {
return l_complex(a,b); }
515inline l_complex _l_complex(
const real &a)
noexcept
516 {
return l_complex(a); }
517inline l_complex _l_complex(
const real &a,
const real &b)
518 noexcept {
return l_complex(a,b); }
519inline l_complex _l_complex(
const complex &c)
520 noexcept {
return l_complex(c); }
521inline l_complex _l_complex(
const dotprecision &d)
522 noexcept {
return l_complex(d); }
523inline l_complex conj(
const l_complex&)
noexcept;
527l_real & Re(l_complex& a);
528l_real Re(
const l_complex& a);
529l_real & Im(l_complex& a);
530l_real Im(
const l_complex& a);
532l_complex & SetRe(l_complex & a,
const l_real & b);
536l_complex & SetIm(l_complex & a,
const l_real & b);
539l_complex _l_complex(
const cdotprecision &)
noexcept;
543#include "l_complex.inl"
The Data Type cdotprecision.
The Data Type dotprecision.
The Multiple-Precision Data Type l_complex.
l_complex & operator=(const l_real &lr) noexcept
Implementation of standard assigning operator.
friend cdotprecision & operator+=(cdotprecision &cd, const l_complex &lc) noexcept
Implementation of standard algebraic addition and allocation operation.
friend l_complex divn(const l_complex &, const l_complex &)
Division of two real values and rounding to the nearest value.
friend bool operator==(const l_complex &, const l_complex &) noexcept
Implementation of standard equality operation.
friend l_complex & operator*=(l_complex &, const l_complex &) noexcept
Implementation of standard algebraic multiplication and allocation operation.
l_complex(const real &a, const real &b) noexcept
Constructor of class l_complex.
friend l_real & Im(l_complex &a)
Returns the imaginary part of the complex value.
l_complex(const cdotprecision &cd) noexcept
Constructor of class l_complex.
friend l_complex & SetIm(l_complex &a, const l_real &b)
Sets the imaginary part of a complex value.
friend l_complex operator*(const l_complex &a, const l_complex &b) noexcept
Implementation of standard algebraic multiplication operation.
friend l_real abs(const l_complex &z) noexcept
The absolute value of a l_complex value.
friend l_real abs2(const l_complex &a) noexcept
The absolute value of a l_complex value.
friend l_complex & SetRe(l_complex &a, const l_real &b)
Sets the real part of a complex value.
friend std::ostream & operator<<(std::ostream &s, const l_complex &z) noexcept
Implementation of standard output method.
friend bool operator!=(const l_complex &, const l_complex &) noexcept
Implementation of standard negated equality operation.
friend l_complex conj(const l_complex &) noexcept
Returns the conjugated complex value.
friend l_complex operator/(const l_complex &, const l_complex &) noexcept
Implementation of standard algebraic division operation.
friend cdotprecision & operator-=(cdotprecision &cd, const l_complex &lc) noexcept
Implementation of standard algebraic subtraction and allocation operation.
l_complex(const real &r) noexcept
Constructor of class l_complex.
friend l_real & Re(l_complex &a)
Returns the real part of the complex value.
friend l_complex operator-(const l_complex &)
Implementation of standard algebraic negative sign operation.
l_complex(const dotprecision &d) noexcept
Constructor of class l_complex.
friend int StagPrec(const l_complex &) noexcept
Returns the precision of the long datatype value.
l_complex(const l_real &r) noexcept
Constructor of class l_complex.
l_complex(void) noexcept
Constructor of class l_complex.
friend l_complex _l_complex(const cdotprecision &cd) noexcept
l_complex(const l_real &a, const l_real &b) noexcept
Constructor of class l_complex.
friend std::istream & operator>>(std::istream &s, l_complex &a) noexcept
Implementation of standard input method.
friend l_complex & operator/=(l_complex &, const l_complex &) noexcept
Implementation of standard algebraic division and allocation operation.
friend void accumulate(cdotprecision &, const l_complex &, const l_complex &) noexcept
The accurate scalar product of the last two arguments added to the value of the first argument.
l_complex _l_complex(const cdotprecision &)
Deprecated typecast, which only exist for the reason of compatibility with older versions of C-XSC.
friend l_complex operator+(const l_complex &)
Implementation of standard algebraic positive sign operation.
l_complex(const complex &r) noexcept
Constructor of class l_complex.
The Multiple-Precision Data Type l_real.
The namespace cxsc, providing all functionality of the class library C-XSC.