sigma  0.0.0
Loading...
Searching...
No Matches
hyperbolic.ipp
1#pragma once
2
4#include <cmath>
5
6namespace sigma {
7
8template<typename T>
10 T mean = std::sinh(a.mean());
11 T dcda = std::cosh(a.mean());
12 return detail_::unary_result(a, mean, dcda);
13}
14
15template<typename T>
17 T mean = std::cosh(a.mean());
18 T dcda = std::sinh(a.mean());
19 return detail_::unary_result(a, mean, dcda);
20}
21
22template<typename T>
24 T mean = std::tanh(a.mean());
25 T dcda = 1.0 - std::pow(std::tanh(a.mean()), 2.0);
26 return detail_::unary_result(a, mean, dcda);
27}
28
29template<typename T>
31 T mean = std::asinh(a.mean());
32 T dcda = 1.0 / std::sqrt(1 + std::pow(a.mean(), 2.0));
33 return detail_::unary_result(a, mean, dcda);
34}
35
36template<typename T>
38 T mean = std::acosh(a.mean());
39 T dcda = 1.0 / std::sqrt(std::pow(a.mean(), 2.0) - 1.0);
40 return detail_::unary_result(a, mean, dcda);
41}
42
43template<typename T>
45 T mean = std::atanh(a.mean());
46 T dcda = 1.0 / (1.0 - std::pow(a.mean(), 2.0));
47 return detail_::unary_result(a, mean, dcda);
48}
49
50} // namespace sigma
Models an unceratin variable.
Definition uncertain.hpp:33
value_t mean() const
Get the mean value of the variable.
Definition uncertain.hpp:82
Uncertain< T > unary_result(const Uncertain< T > &a, T mean, T dcda)
Generalized Unary Changes.
Definition operation_common.hpp:44
The primary namespace for the sigma library.
Definition operation_common.hpp:10
Uncertain< T > sinh(const Uncertain< T > &a)
Hyperbolic sine of the variable.
Definition hyperbolic.ipp:9
Uncertain< T > cosh(const Uncertain< T > &a)
Hyperbolic cosine of the variable.
Definition hyperbolic.ipp:16
Uncertain< T > tanh(const Uncertain< T > &a)
Hyperbolic tangent of the variable.
Definition hyperbolic.ipp:23
Uncertain< T > asinh(const Uncertain< T > &a)
Hyperbolic arcsine of the variable.
Definition hyperbolic.ipp:30
Uncertain< T > atanh(const Uncertain< T > &a)
Hyperbolic arctangent of the variable.
Definition hyperbolic.ipp:44
Uncertain< T > acosh(const Uncertain< T > &a)
Hyperbolic arccosine of the variable.
Definition hyperbolic.ipp:37
Common implementation details for operations.