29 template<
class Arg,
typename Op>
38 template<
class T> std::complex<T>
sin(std::complex<T> a) {
return std::sin(a); }
43 template<
class T> std::complex<T>
cos(std::complex<T> a) {
return std::cos(a); }
48 template<
class T> std::complex<T>
exp(std::complex<T> a) {
return std::exp(a); }
53 template<
class T> std::complex<T>
log(std::complex<T> a) {
return std::log(a); }
61 template<
class T> T
abs(std::complex<T> a) {
return std::abs(a); }
90 typename =
typename std::enable_if<IsSymbolic<Arg>::value>::type>
94 typename =
typename std::enable_if<IsSymbolic<Arg>::value>::type>
98 typename =
typename std::enable_if<IsSymbolic<Arg>::value>::type>
102 typename =
typename std::enable_if<IsSymbolic<Arg>::value>::type>
106 typename =
typename std::enable_if<IsSymbolic<Arg>::value>::type>
125 template<
class Var,
class Arg1,
class Arg2,
class Op>
auto cos(const Arg &arg) -> STATOR_AUTORETURN((UnaryOp< decltype(store(arg)), detail::Cosine >(arg)))
Symbolic representation of a variable.
auto abs(const Arg &arg) -> STATOR_AUTORETURN((UnaryOp< decltype(store(arg)), detail::Absolute >(arg)))
auto cos(const C< num, den > &a) -> STATOR_AUTORETURN(cos_Cimpl(a, detail::select_overload
A class representing a compile-time rational constant (i.e., std::ratio).
Symbolic representation of a variable substitution.
auto sin(const C< num, den > &a) -> STATOR_AUTORETURN(sin_Cimpl(a, detail::select_overload
auto exp(const Arg &arg) -> STATOR_AUTORETURN((UnaryOp< decltype(store(arg)), detail::Exp >(arg)))
#define STATOR_AUTORETURN(EXPR)
A convenience Macro for defining auto return type functions.
The stator symbolic math library.
auto sin(const Arg &arg) -> STATOR_AUTORETURN((UnaryOp< decltype(store(arg)), detail::Sine >(arg)))
auto arbsign(const Arg &arg) -> STATOR_AUTORETURN((UnaryOp< decltype(store(arg)), detail::Arbsign >(arg)))
auto sub(BinaryOp< LHS, Op, RHS > f, Relation< Var, Arg > x) -> STATOR_AUTORETURN_BYVALUE(Op::apply(sub(f._l, x), sub(f._r, x)))
constexpr C<(1 - 2 *(num< 0)) *num,(1 - 2 *(den< 0)) *den > abs(const C< num, den > &a)
auto derivative(const Expression &)
Performs a symbolic derivative on the expression.
A type trait to denote symbolic terms (i.e., one that is not yet immediately evaluable to a "normal" ...
auto log(const Arg &arg) -> STATOR_AUTORETURN((UnaryOp< decltype(store(arg)), detail::Log >(arg)))
Symbolic representation of a unary operator (i.e., sin(x)).
auto store(const T &val) -> decltype(store_impl(val, select_overload