CGEM BOSS 6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
DifNumber Class Reference

#include <DifNumber.h>

Public Member Functions

 DifNumber ()
 
 DifNumber (double s, int npar=0)
 
 DifNumber (double s, const HepVector &d)
 
 DifNumber (double s, int i, double di, int npar)
 
 DifNumber (double s, int i, int npar)
 
 DifNumber (double s, const DifIndepPar *indeppar)
 
 DifNumber (double s, int i, const DifIndepPar *indepar)
 
 DifNumber (const DifNumber &s)
 
virtual ~DifNumber ()
 
void setNumber (double i)
 
void setNPar (int i)
 
void setDerivatives (const HepVector &d)
 
void setDerivative (int i, double value)
 
void zeroDerivatives ()
 
void setIndepPar (const DifIndepPar *par)
 
void extendPar (int nnew)
 
double number () const
 
double & gimeNumber ()
 
HepVector derivatives () const
 
double derivative (int i) const
 
int nMax ()
 
int nPar () const
 
const DifIndepParindepPar () const
 
double error (const HepSymMatrix &e) const
 
double error () const
 
void tickle () const
 
void print () const
 
DifNumberoperator+= (const DifNumber &a)
 
DifNumberoperator-= (const DifNumber &a)
 
DifNumberoperator*= (const DifNumber &a)
 
DifNumberoperator/= (const DifNumber &a)
 
DifNumberoperator= (const DifNumber &a)
 
DifNumber operator- () const
 
DifNumberoperator+= (const double &a)
 
DifNumberoperator-= (const double &a)
 
DifNumberoperator*= (const double &a)
 
DifNumberoperator/= (const double &a)
 
DifNumberoperator= (const double &a)
 
DifNumberinverse ()
 
DifNumberflipsign ()
 
DifNumberabsolute ()
 
void cosAndSin (DifNumber &c, DifNumber &s) const
 
DifNumbersquareRoot ()
 
DifNumbermod (double lo, double hi)
 
DifNumberarcTangent (const DifNumber &x)
 
DifNumberpower (double p)
 
DifNumberpower (const DifNumber &p)
 
double sign () const
 
double correlation (const DifNumber &b, const HepSymMatrix &e) const
 
double correlation (const DifNumber &b) const
 
void sumMatrix (HepMatrix &m) const
 
void fetchNumber (double &n) const
 
void fetchDerivatives (HepVector &v) const
 

Friends

DifNumber operator+ (const DifNumber &a, const DifNumber &b)
 
DifNumber operator- (const DifNumber &a, const DifNumber &b)
 
DifNumber operator* (const DifNumber &a, const DifNumber &b)
 
DifNumber operator/ (const DifNumber &a, const DifNumber &b)
 
DifNumber operator+ (const DifNumber &a, const double &b)
 
DifNumber operator- (const DifNumber &a, const double &b)
 
DifNumber operator* (const DifNumber &a, const double &b)
 
DifNumber operator/ (const DifNumber &a, const double &b)
 
DifNumber operator+ (const double &a, const DifNumber &b)
 
DifNumber operator- (const double &a, const DifNumber &b)
 
DifNumber operator* (const double &a, const DifNumber &b)
 
DifNumber operator/ (const double &a, const DifNumber &b)
 
bool operator> (const DifNumber &a, const DifNumber &b)
 
bool operator> (const DifNumber &a, const double &b)
 
bool operator> (const double &a, const DifNumber &b)
 
bool operator< (const DifNumber &a, const DifNumber &b)
 
bool operator< (const DifNumber &a, const double &b)
 
bool operator< (const double &a, const DifNumber &b)
 
bool operator>= (const DifNumber &a, const DifNumber &b)
 
bool operator>= (const DifNumber &a, const double &b)
 
bool operator>= (const double &a, const DifNumber &b)
 
bool operator<= (const DifNumber &a, const DifNumber &b)
 
bool operator<= (const DifNumber &a, const double &b)
 
bool operator<= (const double &a, const DifNumber &b)
 
bool operator== (const DifNumber &a, const DifNumber &b)
 
bool operator== (const DifNumber &a, const double &b)
 
bool operator== (const double &a, const DifNumber &b)
 
bool operator!= (const DifNumber &a, const DifNumber &b)
 
bool operator!= (const DifNumber &a, const double &b)
 
bool operator!= (const double &a, const DifNumber &b)
 
DifNumber sin (const DifNumber &a)
 
DifNumber cos (const DifNumber &a)
 
DifNumber tan (const DifNumber &a)
 
DifNumber sec (const DifNumber &a)
 
DifNumber asin (const DifNumber &a)
 
DifNumber acos (const DifNumber &a)
 
DifNumber atan (const DifNumber &a)
 
DifNumber atan2 (const DifNumber &y, const DifNumber &x)
 
DifNumber atan2 (const DifNumber &y, const double &x)
 
DifNumber atan2 (const double &y, const DifNumber &x)
 
DifNumber exp (const DifNumber &a)
 
DifNumber cosh (const DifNumber &a)
 
DifNumber sinh (const DifNumber &a)
 
DifNumber tanh (const DifNumber &a)
 
DifNumber sqrt (const DifNumber &a)
 
DifNumber log (const DifNumber &a)
 
DifNumber fabs (const DifNumber &a)
 
DifNumber pow (const DifNumber &a, const DifNumber &b)
 
DifNumber pow (const DifNumber &a, int i)
 
DifNumber pow (const DifNumber &a, float i)
 
DifNumber pow (const DifNumber &a, double i)
 
double correlation (const DifNumber &a, const DifNumber &b, const HepSymMatrix &e)
 
double correlation (const DifNumber &a, const DifNumber &b)
 

Detailed Description

Definition at line 42 of file DifNumber.h.

Constructor & Destructor Documentation

◆ DifNumber() [1/8]

DifNumber::DifNumber ( )
inline

Referenced by operator-().

◆ DifNumber() [2/8]

DifNumber::DifNumber ( double s,
int npar = 0 )
inlineexplicit

◆ DifNumber() [3/8]

DifNumber::DifNumber ( double s,
const HepVector & d )
inline

◆ DifNumber() [4/8]

DifNumber::DifNumber ( double s,
int i,
double di,
int npar )
inline

◆ DifNumber() [5/8]

DifNumber::DifNumber ( double s,
int i,
int npar )
inline

◆ DifNumber() [6/8]

DifNumber::DifNumber ( double s,
const DifIndepPar * indeppar )
inline

◆ DifNumber() [7/8]

DifNumber::DifNumber ( double s,
int i,
const DifIndepPar * indepar )
inline

◆ DifNumber() [8/8]

DifNumber::DifNumber ( const DifNumber & s)
inline

◆ ~DifNumber()

virtual DifNumber::~DifNumber ( )
inlinevirtual

Definition at line 75 of file DifNumber.h.

75{}

Member Function Documentation

◆ absolute()

DifNumber & DifNumber::absolute ( )
inline

Definition at line 122 of file DifNumber.h.

122{ if (_number<0) flipsign(); return *this; }
DifNumber & flipsign()

◆ arcTangent()

DifNumber & DifNumber::arcTangent ( const DifNumber & x)
inline

◆ correlation() [1/2]

double DifNumber::correlation ( const DifNumber & b) const

Definition at line 66 of file DifNumber.cxx.

66 {
67 if(indepPar()==0) return 0.0;
68 if(b.indepPar()!=indepPar()) return 0.0;
69 return correlation(b,indepPar()->covariance());
70}
const DifIndepPar * indepPar() const
Definition DifNumber.h:93
friend double correlation(const DifNumber &a, const DifNumber &b, const HepSymMatrix &e)
Definition DifNumber.cxx:78

◆ correlation() [2/2]

double DifNumber::correlation ( const DifNumber & b,
const HepSymMatrix & e ) const

Definition at line 53 of file DifNumber.cxx.

53 {
54 assert(e.num_col()==nPar());
55 assert(e.num_row()==b.nPar());
56 double error = 0.;
57 for(int i=1; i<=nPar(); i++) {
58 for(int j=1; j<=b.nPar(); j++) {
59 error+=derivative(i)*e(i,j)*b.derivative(j);
60 }
61 }
62 return error;
63}
double error() const
Definition DifNumber.cxx:36
double derivative(int i) const
Definition DifNumber.h:90
int nPar() const
Definition DifNumber.h:92

◆ cosAndSin()

◆ derivative()

double DifNumber::derivative ( int i) const
inline

Definition at line 90 of file DifNumber.h.

90{return _derivatives[i-1];}

Referenced by correlation(), fetchDerivatives(), DifArray::jacobian(), DifFourVector::jacobian(), DifVector::jacobian(), and print().

◆ derivatives()

HepVector DifNumber::derivatives ( ) const

Definition at line 46 of file DifNumber.cxx.

46 {
47 HepVector temp(nPar());
48 fetchDerivatives(temp);
49 return temp;
50}
void fetchDerivatives(HepVector &v) const
Definition DifNumber.cxx:41

Referenced by TrkDifPoca::derivs(), and TrkRep::positionErr().

◆ error() [1/2]

double DifNumber::error ( ) const

Definition at line 36 of file DifNumber.cxx.

36 {
37 if(indepPar()==0) {return 0.0;}
38 return error(indepPar()->covariance());
39}

Referenced by correlation(), and error().

◆ error() [2/2]

double DifNumber::error ( const HepSymMatrix & e) const

Definition at line 32 of file DifNumber.cxx.

32 {
33 return sqrt(correlation(*this,e));
34}
friend DifNumber sqrt(const DifNumber &a)
Definition DifNumber.h:209

◆ extendPar()

void DifNumber::extendPar ( int nnew)
inline

◆ fetchDerivatives()

void DifNumber::fetchDerivatives ( HepVector & v) const

Definition at line 41 of file DifNumber.cxx.

41 {
42 assert(v.num_row()==nPar());
43 for(int i=1; i<=nPar(); i++) {v(i)=derivative(i);}
44}
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v
Definition KarLud.h:35

Referenced by derivatives(), and TrkDifPoca::fetchDerivs().

◆ fetchNumber()

void DifNumber::fetchNumber ( double & n) const
inline

Definition at line 138 of file DifNumber.h.

138{n=number();}
const Int_t n
double number() const
Definition DifNumber.h:87

◆ flipsign()

DifNumber & DifNumber::flipsign ( )
inline

Referenced by absolute(), and operator-().

◆ gimeNumber()

double & DifNumber::gimeNumber ( )
inline

Definition at line 88 of file DifNumber.h.

88{return _number;}

◆ indepPar()

const DifIndepPar * DifNumber::indepPar ( ) const
inline

◆ inverse()

DifNumber & DifNumber::inverse ( )
inline

◆ mod()

DifNumber & DifNumber::mod ( double lo,
double hi )
inline

◆ nMax()

int DifNumber::nMax ( )
inline

Definition at line 91 of file DifNumber.h.

91{return _nmax;}

◆ nPar()

int DifNumber::nPar ( ) const
inline

◆ number()

double DifNumber::number ( ) const
inline

◆ operator*=() [1/2]

DifNumber & DifNumber::operator*= ( const DifNumber & a)
inline

◆ operator*=() [2/2]

DifNumber & DifNumber::operator*= ( const double & a)
inline

◆ operator+=() [1/2]

DifNumber & DifNumber::operator+= ( const DifNumber & a)
inline

◆ operator+=() [2/2]

DifNumber & DifNumber::operator+= ( const double & a)
inline

◆ operator-()

DifNumber DifNumber::operator- ( ) const
inline

Definition at line 109 of file DifNumber.h.

110 { return DifNumber(*this).flipsign(); } // unary minus

◆ operator-=() [1/2]

DifNumber & DifNumber::operator-= ( const DifNumber & a)
inline

◆ operator-=() [2/2]

DifNumber & DifNumber::operator-= ( const double & a)
inline

◆ operator/=() [1/2]

DifNumber & DifNumber::operator/= ( const DifNumber & a)
inline

◆ operator/=() [2/2]

DifNumber & DifNumber::operator/= ( const double & a)
inline

◆ operator=() [1/2]

DifNumber & DifNumber::operator= ( const DifNumber & a)
inline

◆ operator=() [2/2]

DifNumber & DifNumber::operator= ( const double & a)
inline

◆ power() [1/2]

DifNumber & DifNumber::power ( const DifNumber & p)
inline

◆ power() [2/2]

DifNumber & DifNumber::power ( double p)
inline

◆ print()

void DifNumber::print ( ) const

Definition at line 81 of file DifNumber.cxx.

81 {
82 cout << "number:" << number() << endl;
83 cout << "npar:" << nPar() << endl;
84 for(int i=1; i<=nPar(); i++) {
85 cout << "derivative(" << i << "):" << derivative(i) << endl;
86 }
87}

◆ setDerivative()

void DifNumber::setDerivative ( int i,
double value )
inline

Definition at line 81 of file DifNumber.h.

81{ _derivatives[i-1]=value;}

Referenced by zeroDerivatives().

◆ setDerivatives()

void DifNumber::setDerivatives ( const HepVector & d)
inline

Definition at line 80 of file DifNumber.h.

80{ copyDerivs(d); }

◆ setIndepPar()

void DifNumber::setIndepPar ( const DifIndepPar * par)
inline

◆ setNPar()

void DifNumber::setNPar ( int i)
inline

Definition at line 79 of file DifNumber.h.

79{ _npar=i;}

Referenced by DifArray::zero().

◆ setNumber()

void DifNumber::setNumber ( double i)
inline

Definition at line 78 of file DifNumber.h.

78{ _number=i;}

◆ sign()

double DifNumber::sign ( ) const
inline

Definition at line 130 of file DifNumber.h.

130{ return _number>=0 ? 1 : -1; }

◆ squareRoot()

DifNumber & DifNumber::squareRoot ( )
inline

◆ sumMatrix()

void DifNumber::sumMatrix ( HepMatrix & m) const

◆ tickle()

void DifNumber::tickle ( ) const
inline

Definition at line 96 of file DifNumber.h.

96{return;} // tickle a number

◆ zeroDerivatives()

void DifNumber::zeroDerivatives ( )
inline

Definition at line 82 of file DifNumber.h.

82{ for(int i=1; i<=nPar(); i++) setDerivative(i,0.0); }
void setDerivative(int i, double value)
Definition DifNumber.h:81

Friends And Related Symbol Documentation

◆ acos

DifNumber acos ( const DifNumber & a)
friend

◆ asin

DifNumber asin ( const DifNumber & a)
friend

◆ atan

DifNumber atan ( const DifNumber & a)
friend

◆ atan2 [1/3]

DifNumber atan2 ( const DifNumber & y,
const DifNumber & x )
friend

Definition at line 195 of file DifNumber.h.

195{ return DifNumber(y).arcTangent(x); }

◆ atan2 [2/3]

DifNumber atan2 ( const DifNumber & y,
const double & x )
friend

Definition at line 196 of file DifNumber.h.

196{ return DifNumber(y).arcTangent(DifNumber(x)); }

◆ atan2 [3/3]

DifNumber atan2 ( const double & y,
const DifNumber & x )
friend

Definition at line 197 of file DifNumber.h.

197{ return DifNumber(y).arcTangent(x); }

◆ correlation [1/2]

double correlation ( const DifNumber & a,
const DifNumber & b )
friend

Definition at line 72 of file DifNumber.cxx.

73{
74 return (a.indepPar()==0||b.indepPar()==0||a.indepPar()!=b.indepPar())?0:a.correlation(b,a.indepPar()->covariance());
75}
HepSymMatrix & covariance()
Definition DifIndepPar.h:53
double correlation(const DifNumber &b, const HepSymMatrix &e) const
Definition DifNumber.cxx:53

◆ correlation [2/2]

double correlation ( const DifNumber & a,
const DifNumber & b,
const HepSymMatrix & e )
friend

Definition at line 78 of file DifNumber.cxx.

79{ return a.correlation(b,e); }

Referenced by correlation(), and error().

◆ cos

DifNumber cos ( const DifNumber & a)
friend

Definition at line 185 of file DifNumber.h.

186 { return DifNumber(cos(a.number()),a,-sin(a.number())); }
friend DifNumber sin(const DifNumber &a)
Definition DifNumber.h:183
friend DifNumber cos(const DifNumber &a)
Definition DifNumber.h:185

◆ cosh

DifNumber cosh ( const DifNumber & a)
friend

Definition at line 201 of file DifNumber.h.

202 { return 0.5*(DifNumber(exp(a))+=exp(-a)); }
friend DifNumber exp(const DifNumber &a)
Definition DifNumber.h:199

◆ exp

DifNumber exp ( const DifNumber & a)
friend

Definition at line 199 of file DifNumber.h.

200 { double e=exp(a.number()); return DifNumber(e,a,e); }

◆ fabs

DifNumber fabs ( const DifNumber & a)
friend

Definition at line 213 of file DifNumber.h.

214 { return DifNumber(fabs(a.number()),a,a.sign()); }
friend DifNumber fabs(const DifNumber &a)
Definition DifNumber.h:213
double sign() const
Definition DifNumber.h:130

◆ log

DifNumber log ( const DifNumber & a)
friend

Definition at line 211 of file DifNumber.h.

212 { return DifNumber(log(a.number()),a,1.0/a.number()); }
friend DifNumber log(const DifNumber &a)
Definition DifNumber.h:211

◆ operator!= [1/3]

bool operator!= ( const DifNumber & a,
const DifNumber & b )
friend

Definition at line 179 of file DifNumber.h.

179{ return !(a==b); }

◆ operator!= [2/3]

bool operator!= ( const DifNumber & a,
const double & b )
friend

Definition at line 180 of file DifNumber.h.

180{ return true; }

◆ operator!= [3/3]

bool operator!= ( const double & a,
const DifNumber & b )
friend

Definition at line 181 of file DifNumber.h.

181{ return true; }

◆ operator* [1/3]

DifNumber operator* ( const DifNumber & a,
const DifNumber & b )
friend

Definition at line 144 of file DifNumber.h.

144{ return DifNumber(a)*=b; }

◆ operator* [2/3]

DifNumber operator* ( const DifNumber & a,
const double & b )
friend

Definition at line 149 of file DifNumber.h.

149{ return DifNumber(a)*=b; }

◆ operator* [3/3]

DifNumber operator* ( const double & a,
const DifNumber & b )
friend

Definition at line 154 of file DifNumber.h.

154{ return DifNumber(a)*=b; }

◆ operator+ [1/3]

DifNumber operator+ ( const DifNumber & a,
const DifNumber & b )
friend

Definition at line 142 of file DifNumber.h.

142{ return DifNumber(a)+=b; }

◆ operator+ [2/3]

DifNumber operator+ ( const DifNumber & a,
const double & b )
friend

Definition at line 147 of file DifNumber.h.

147{ return DifNumber(a)+=b; }

◆ operator+ [3/3]

DifNumber operator+ ( const double & a,
const DifNumber & b )
friend

Definition at line 152 of file DifNumber.h.

152{ return DifNumber(a)+=b; }

◆ operator- [1/3]

DifNumber operator- ( const DifNumber & a,
const DifNumber & b )
friend

Definition at line 143 of file DifNumber.h.

143{ return DifNumber(a)-=b; }

◆ operator- [2/3]

DifNumber operator- ( const DifNumber & a,
const double & b )
friend

Definition at line 148 of file DifNumber.h.

148{ return DifNumber(a)-=b; }

◆ operator- [3/3]

DifNumber operator- ( const double & a,
const DifNumber & b )
friend

Definition at line 153 of file DifNumber.h.

153{ return DifNumber(a)-=b; }

◆ operator/ [1/3]

DifNumber operator/ ( const DifNumber & a,
const DifNumber & b )
friend

Definition at line 145 of file DifNumber.h.

145{ return DifNumber(a)/=b; }

◆ operator/ [2/3]

DifNumber operator/ ( const DifNumber & a,
const double & b )
friend

Definition at line 150 of file DifNumber.h.

150{ return DifNumber(a)/=b; }

◆ operator/ [3/3]

DifNumber operator/ ( const double & a,
const DifNumber & b )
friend

Definition at line 155 of file DifNumber.h.

155{ return DifNumber(a)/=b; }

◆ operator< [1/3]

bool operator< ( const DifNumber & a,
const DifNumber & b )
friend

Definition at line 162 of file DifNumber.h.

162{ return b>a; }

◆ operator< [2/3]

bool operator< ( const DifNumber & a,
const double & b )
friend

Definition at line 163 of file DifNumber.h.

163{ return b>a; }

◆ operator< [3/3]

bool operator< ( const double & a,
const DifNumber & b )
friend

Definition at line 164 of file DifNumber.h.

164{ return b>a; }

◆ operator<= [1/3]

bool operator<= ( const DifNumber & a,
const DifNumber & b )
friend

Definition at line 171 of file DifNumber.h.

171{ return b>=a; }

◆ operator<= [2/3]

bool operator<= ( const DifNumber & a,
const double & b )
friend

Definition at line 172 of file DifNumber.h.

172{ return b>=a; }

◆ operator<= [3/3]

bool operator<= ( const double & a,
const DifNumber & b )
friend

Definition at line 173 of file DifNumber.h.

173{ return b>=a; }

◆ operator== [1/3]

bool operator== ( const DifNumber & a,
const DifNumber & b )
friend

◆ operator== [2/3]

bool operator== ( const DifNumber & a,
const double & b )
friend

Definition at line 176 of file DifNumber.h.

176{return false;}

◆ operator== [3/3]

bool operator== ( const double & a,
const DifNumber & b )
friend

Definition at line 177 of file DifNumber.h.

177{return false;}

◆ operator> [1/3]

bool operator> ( const DifNumber & a,
const DifNumber & b )
friend

Definition at line 158 of file DifNumber.h.

158{ return a.number()>b.number(); }

◆ operator> [2/3]

bool operator> ( const DifNumber & a,
const double & b )
friend

Definition at line 159 of file DifNumber.h.

159{ return a.number()>b; }

◆ operator> [3/3]

bool operator> ( const double & a,
const DifNumber & b )
friend

Definition at line 160 of file DifNumber.h.

160{ return a>b.number(); }

◆ operator>= [1/3]

bool operator>= ( const DifNumber & a,
const DifNumber & b )
friend

Definition at line 167 of file DifNumber.h.

167{ return a.number()>=b.number(); }

◆ operator>= [2/3]

bool operator>= ( const DifNumber & a,
const double & b )
friend

Definition at line 168 of file DifNumber.h.

168{ return a.number()>=b; }

◆ operator>= [3/3]

bool operator>= ( const double & a,
const DifNumber & b )
friend

Definition at line 169 of file DifNumber.h.

169{ return a>=b.number(); }

◆ pow [1/4]

DifNumber pow ( const DifNumber & a,
const DifNumber & b )
friend

Definition at line 215 of file DifNumber.h.

215{ return DifNumber(a).power(b); }

◆ pow [2/4]

DifNumber pow ( const DifNumber & a,
double i )
friend

Definition at line 218 of file DifNumber.h.

218 {
219 return i==0?DifNumber(1.0,a,0.0)
220 :DifNumber(pow(a.number(),i),a,i*pow(a.number(),i-1)); }
friend DifNumber pow(const DifNumber &a, const DifNumber &b)
Definition DifNumber.h:215

◆ pow [3/4]

DifNumber pow ( const DifNumber & a,
float i )
friend

Definition at line 217 of file DifNumber.h.

217{ return pow(a,(double)i);}

◆ pow [4/4]

DifNumber pow ( const DifNumber & a,
int i )
friend

Definition at line 216 of file DifNumber.h.

216{ return pow(a,(double)i);}

◆ sec

DifNumber sec ( const DifNumber & a)
friend

Definition at line 189 of file DifNumber.h.

190 { return DifNumber(cos(a)).inverse(); }

◆ sin

DifNumber sin ( const DifNumber & a)
friend

Definition at line 183 of file DifNumber.h.

184 { return DifNumber(sin(a.number()),a,cos(a.number())); }

◆ sinh

DifNumber sinh ( const DifNumber & a)
friend

Definition at line 203 of file DifNumber.h.

204 { return 0.5*(DifNumber(exp(a))-=exp(-a)); }

◆ sqrt

DifNumber sqrt ( const DifNumber & a)
friend

Definition at line 209 of file DifNumber.h.

210 { return DifNumber(a).squareRoot(); }

Referenced by error().

◆ tan

DifNumber tan ( const DifNumber & a)
friend

Definition at line 187 of file DifNumber.h.

188 { double t=tan(a.number()); return DifNumber(t,a,1.0+t*t); }
friend DifNumber tan(const DifNumber &a)
Definition DifNumber.h:187
int t()
Definition t.c:1

◆ tanh

DifNumber tanh ( const DifNumber & a)
friend

Definition at line 205 of file DifNumber.h.

206 { double t=tanh(a.number()); return DifNumber(t,a,1.0-t*t); }
friend DifNumber tanh(const DifNumber &a)
Definition DifNumber.h:205

The documentation for this class was generated from the following files: