PhoenixGraph  01.0.0
Set of tools to simplify graph manipulation
Loading...
Searching...
No Matches
pstatic_computation.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  PPower< V, N >
 Compute the power of an unsigned int statically. More...
 
struct  PPower< V, 0 >
 Compute the power of an unsigned int statically. More...
 
struct  PPower< V, 1 >
 Compute the power of an unsigned int statically. More...
 
struct  pstatic_fact< N >
 Compute the factorial of an unsigned int statically. More...
 
struct  pstatic_fact< 0 >
 Compute the factorial of an unsigned int statically. More...
 

Functions

template<int I>
double pstatic_atanhd (double x)
 Compute hyperbolic arctangente for double.
 
template<>
double pstatic_atanhd< 0 > (double x)
 Compute hyperbolic arctangente for double.
 
template<>
double pstatic_atanhd< 1 > (double x)
 Compute hyperbolic arctangente for double.
 
template<int I>
float pstatic_atanhf (float x)
 Compute hyperbolic arctangente for float.
 
template<>
float pstatic_atanhf< 0 > (float x)
 Compute hyperbolic arctangente for float.
 
template<>
float pstatic_atanhf< 1 > (float x)
 Compute hyperbolic arctangente for float.
 
template<int N>
double pstatic_cosd (double x)
 Compute cosine for double.
 
template<>
double pstatic_cosd< 0 > (double x)
 Compute cosine for double.
 
template<int N>
float pstatic_cosf (float x)
 Compute cosine for float.
 
template<>
float pstatic_cosf< 0 > (float x)
 Compute cosine for float.
 
template<int N>
double pstatic_expd (double x)
 Compute exponentiel for double.
 
template<int I>
double pstatic_expd_part (double x)
 Compute exponentiel for double.
 
template<>
double pstatic_expd_part< 0 > (double x)
 Compute exponentiel for double.
 
template<int N>
float pstatic_expf (float x)
 Compute exponentiel for float.
 
template<int I>
float pstatic_expf_part (float x)
 Compute exponentiel for float.
 
template<>
float pstatic_expf_part< 0 > (float x)
 Compute exponentiel for float.
 
template<unsigned int I>
double pstatic_factd ()
 Compute factorial for double.
 
template<>
double pstatic_factd< 0 > ()
 Compute factorial for double.
 
template<unsigned int I>
float pstatic_factf ()
 Compute factorial for float.
 
template<>
float pstatic_factf< 0 > ()
 Compute factorial for float.
 
template<int N>
double pstatic_powd (double x)
 Compute power for double.
 
template<>
double pstatic_powd< 0 > (double x)
 Compute power for double.
 
template<int N>
float pstatic_powf (float x)
 Compute power for float.
 
template<>
float pstatic_powf< 0 > (float x)
 Compute power for float.
 

Function Documentation

◆ pstatic_atanhd()

template<int I>
double pstatic_atanhd ( double x)
inline

Compute hyperbolic arctangente for double.

Returns
hyperbolic arctangente for double I is the order of the developpement

Definition at line 169 of file pstatic_computation.h.

169 {
170 return pstatic_atanhd<I - 1>(x) + pstatic_powd<2 * I + 1>(x) / (2 * I + 1);
171}
double pstatic_powd(double x)
Compute power for double.
double pstatic_atanhd(double x)
Compute hyperbolic arctangente for double.

References pstatic_atanhd(), and pstatic_powd().

Referenced by pstatic_atanhd().

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

◆ pstatic_atanhd< 0 >()

template<>
double pstatic_atanhd< 0 > ( double x)
inline

Compute hyperbolic arctangente for double.

Returns
hyperbolic arctangente for double

Definition at line 183 of file pstatic_computation.h.

183 {
184 return 0.0;
185}

◆ pstatic_atanhd< 1 >()

template<>
double pstatic_atanhd< 1 > ( double x)
inline

Compute hyperbolic arctangente for double.

Returns
hyperbolic arctangente for double

Definition at line 176 of file pstatic_computation.h.

176 {
177 return x;
178}

◆ pstatic_atanhf()

template<int I>
float pstatic_atanhf ( float x)
inline

Compute hyperbolic arctangente for float.

Returns
hyperbolic arctangente for float I is the order of the developpement

Definition at line 191 of file pstatic_computation.h.

191 {
192 return pstatic_atanhf<I - 1>(x) + pstatic_powf<2 * I + 1>(x) / (2 * I + 1);
193}
float pstatic_powf(float x)
Compute power for float.
float pstatic_atanhf(float x)
Compute hyperbolic arctangente for float.

References pstatic_atanhf(), and pstatic_powf().

Referenced by pstatic_atanhf().

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

◆ pstatic_atanhf< 0 >()

template<>
float pstatic_atanhf< 0 > ( float x)
inline

Compute hyperbolic arctangente for float.

Returns
hyperbolic arctangente for float

Definition at line 205 of file pstatic_computation.h.

205 {
206 return 0.0f;
207}

◆ pstatic_atanhf< 1 >()

template<>
float pstatic_atanhf< 1 > ( float x)
inline

Compute hyperbolic arctangente for float.

Returns
hyperbolic arctangente for float

Definition at line 198 of file pstatic_computation.h.

198 {
199 return x;
200}

◆ pstatic_cosd()

template<int N>
double pstatic_cosd ( double x)
inline

Compute cosine for double.

Returns
cosine for double N is the order of the developpement

Definition at line 137 of file pstatic_computation.h.

137 {
138 return pstatic_cosd<N - 1>(x) + (N % 2 ? -1 : 1) * pstatic_powd<2 * N>(x) / pstatic_factd<2 * N>();
139}
double pstatic_cosd(double x)
Compute cosine for double.
double pstatic_factd()
Compute factorial for double.

References pstatic_cosd(), pstatic_factd(), and pstatic_powd().

Referenced by pstatic_cosd().

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

◆ pstatic_cosd< 0 >()

template<>
double pstatic_cosd< 0 > ( double x)
inline

Compute cosine for double.

Returns
cosine for double N is the order of the developpement

Definition at line 145 of file pstatic_computation.h.

145 {
146 return 1.0;
147}

◆ pstatic_cosf()

template<int N>
float pstatic_cosf ( float x)
inline

Compute cosine for float.

Returns
cosine for float N is the order of the developpement

Definition at line 153 of file pstatic_computation.h.

153 {
154 return pstatic_cosf<N - 1>(x) + (N % 2 ? -1 : 1) * pstatic_powf<2 * N>(x) / pstatic_factf<2 * N>();
155}
float pstatic_factf()
Compute factorial for float.
float pstatic_cosf(float x)
Compute cosine for float.

References pstatic_cosf(), pstatic_factf(), and pstatic_powf().

Referenced by pstatic_cosf().

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

◆ pstatic_cosf< 0 >()

template<>
float pstatic_cosf< 0 > ( float x)
inline

Compute cosine for float.

Returns
cosine for float N is the order of the developpement

Definition at line 161 of file pstatic_computation.h.

161 {
162 return 1.0f;
163}

◆ pstatic_expd()

template<int N>
double pstatic_expd ( double x)
inline

Compute exponentiel for double.

Returns
exponentiel for double N is the order of the developpement

Definition at line 108 of file pstatic_computation.h.

108 {
109 return x < 0.0 ? 1.0 / pstatic_expd_part<N>(-x) : pstatic_expd_part<N>(x);
110}
double pstatic_expd_part(double x)
Compute exponentiel for double.

References pstatic_expd_part().

+ Here is the call graph for this function:

◆ pstatic_expd_part()

template<int I>
double pstatic_expd_part ( double x)
inline

Compute exponentiel for double.

Returns
exponentiel for double I is the order of the developpement

Definition at line 94 of file pstatic_computation.h.

94 {
95 return pstatic_expd_part<I - 1>(x) + pstatic_powd<I>(x) / pstatic_factd<I>();
96}

References pstatic_expd_part(), pstatic_factd(), and pstatic_powd().

Referenced by pstatic_expd(), and pstatic_expd_part().

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

◆ pstatic_expd_part< 0 >()

template<>
double pstatic_expd_part< 0 > ( double x)
inline

Compute exponentiel for double.

Returns
exponentiel for double I is the order of the developpement

Definition at line 101 of file pstatic_computation.h.

101 {
102 return 0.0;
103}

◆ pstatic_expf()

template<int N>
float pstatic_expf ( float x)
inline

Compute exponentiel for float.

Returns
exponentiel for float N is the order of the developpement

Definition at line 129 of file pstatic_computation.h.

129 {
130 return x < 0.0 ? 1.0 / pstatic_expf_part<N>(-x) : pstatic_expf_part<N>(x);
131}
float pstatic_expf_part(float x)
Compute exponentiel for float.

References pstatic_expf_part().

+ Here is the call graph for this function:

◆ pstatic_expf_part()

template<int I>
float pstatic_expf_part ( float x)
inline

Compute exponentiel for float.

Returns
exponentiel for float I is the order of the developpement

Definition at line 116 of file pstatic_computation.h.

116 {
117 return pstatic_expf_part<I - 1>(x) + pstatic_powf<I>(x) / pstatic_factf<I>();
118}

References pstatic_expf_part(), pstatic_factf(), and pstatic_powf().

Referenced by pstatic_expf(), and pstatic_expf_part().

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

◆ pstatic_expf_part< 0 >()

template<>
float pstatic_expf_part< 0 > ( float x)
inline

Compute exponentiel for float.

Returns
exponentiel for float

Definition at line 122 of file pstatic_computation.h.

122 {
123 return 0.0;
124}

◆ pstatic_factd()

template<unsigned int I>
double pstatic_factd ( )
inline

Compute factorial for double.

Returns
factorial for double

Definition at line 41 of file pstatic_computation.h.

41 {
42 return I * pstatic_factd<I - 1>();
43}

References pstatic_factd().

Referenced by pstatic_cosd(), pstatic_expd_part(), and pstatic_factd().

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

◆ pstatic_factd< 0 >()

template<>
double pstatic_factd< 0 > ( )
inline

Compute factorial for double.

Returns
factorial for double

Definition at line 47 of file pstatic_computation.h.

47 {
48 return 1.0;
49}

◆ pstatic_factf()

template<unsigned int I>
float pstatic_factf ( )
inline

Compute factorial for float.

Returns
factorial for float

Definition at line 54 of file pstatic_computation.h.

54 {
55 return I * pstatic_factf<I - 1>();
56}

References pstatic_factf().

Referenced by pstatic_cosf(), pstatic_expf_part(), and pstatic_factf().

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

◆ pstatic_factf< 0 >()

template<>
float pstatic_factf< 0 > ( )
inline

Compute factorial for float.

Returns
factorial for float

Definition at line 60 of file pstatic_computation.h.

60 {
61 return 1.0f;
62}

◆ pstatic_powd()

template<int N>
double pstatic_powd ( double x)
inline

Compute power for double.

Returns
power for double

Definition at line 67 of file pstatic_computation.h.

67 {
68 return x * pstatic_powd<N - 1>(x);
69}

References pstatic_powd().

Referenced by pstatic_atanhd(), pstatic_cosd(), pstatic_expd_part(), and pstatic_powd().

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

◆ pstatic_powd< 0 >()

template<>
double pstatic_powd< 0 > ( double x)
inline

Compute power for double.

Returns
power for double

Definition at line 73 of file pstatic_computation.h.

73 {
74 return 1.0;
75}

◆ pstatic_powf()

template<int N>
float pstatic_powf ( float x)
inline

Compute power for float.

Returns
power for float

Definition at line 80 of file pstatic_computation.h.

80 {
81 return x * pstatic_powf<N - 1>(x);
82}

References pstatic_powf().

Referenced by pstatic_atanhf(), pstatic_cosf(), pstatic_expf_part(), and pstatic_powf().

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

◆ pstatic_powf< 0 >()

template<>
float pstatic_powf< 0 > ( float x)
inline

Compute power for float.

Returns
power for float

Definition at line 86 of file pstatic_computation.h.

86 {
87 return 1.0f;
88}