40#include "../../misc/exceptions.hpp"
42#include "../../traits/realTraits.hpp"
43#include "../unaryExpression.hpp"
53 template<
typename T_Real>
60 template<
typename Arg>
66 template<
typename Arg>
78#define OPERATION_LOGIC OperationUnaryMinus
79#define FUNCTION operator-
80#include "unaryOverloads.tpp"
83 template<
typename Real,
typename Arg>
126 template<
typename T_Real>
133 template<
typename Arg>
139 template<
typename Arg>
144 }
else if (arg > 0.0) {
156#define OPERATION_LOGIC OperationAbs
158#include "unaryOverloads.tpp"
160#define OPERATION_LOGIC OperationAbs
162#include "unaryOverloads.tpp"
164#define OPERATION_LOGIC OperationAbs
165#define FUNCTION fabsf
166#include "unaryOverloads.tpp"
168#define OPERATION_LOGIC OperationAbs
169#define FUNCTION fabsl
170#include "unaryOverloads.tpp"
173 template<
typename T_Real>
180 template<
typename Arg>
186 template<
typename Arg>
194 return -1.0 / sqrt(1.0 - arg * arg);
202#define OPERATION_LOGIC OperationAcos
204#include "unaryOverloads.tpp"
206#define OPERATION_LOGIC OperationAcos
207#define FUNCTION acosf
208#include "unaryOverloads.tpp"
210#define OPERATION_LOGIC OperationAcos
211#define FUNCTION acosl
212#include "unaryOverloads.tpp"
215 template<
typename T_Real>
222 template<
typename Arg>
228 template<
typename Arg>
236 return 1.0 / sqrt(arg * arg - 1.0);
244#define OPERATION_LOGIC OperationAcosh
245#define FUNCTION acosh
246#include "unaryOverloads.tpp"
248#define OPERATION_LOGIC OperationAcosh
249#define FUNCTION acoshf
250#include "unaryOverloads.tpp"
252#define OPERATION_LOGIC OperationAcosh
253#define FUNCTION acoshl
254#include "unaryOverloads.tpp"
257 template<
typename T_Real>
264 template<
typename Arg>
270 template<
typename Arg>
278 return 1.0 / sqrt(1.0 - arg * arg);
286#define OPERATION_LOGIC OperationAsin
288#include "unaryOverloads.tpp"
290#define OPERATION_LOGIC OperationAsin
291#define FUNCTION asinf
292#include "unaryOverloads.tpp"
294#define OPERATION_LOGIC OperationAsin
295#define FUNCTION asinl
296#include "unaryOverloads.tpp"
299 template<
typename T_Real>
306 template<
typename Arg>
312 template<
typename Arg>
315 return 1.0 / sqrt(arg * arg + 1.0);
323#define OPERATION_LOGIC OperationAsinh
324#define FUNCTION asinh
325#include "unaryOverloads.tpp"
327#define OPERATION_LOGIC OperationAsinh
328#define FUNCTION asinhf
329#include "unaryOverloads.tpp"
331#define OPERATION_LOGIC OperationAsinh
332#define FUNCTION asinhl
333#include "unaryOverloads.tpp"
336 template<
typename T_Real>
343 template<
typename Arg>
349 template<
typename Arg>
352 return 1.0 / (1.0 + arg * arg);
360#define OPERATION_LOGIC OperationAtan
362#include "unaryOverloads.tpp"
364#define OPERATION_LOGIC OperationAtan
365#define FUNCTION atanf
366#include "unaryOverloads.tpp"
368#define OPERATION_LOGIC OperationAtan
369#define FUNCTION atanl
370#include "unaryOverloads.tpp"
373 template<
typename T_Real>
380 template<
typename Arg>
386 template<
typename Arg>
394 return 1.0 / (1.0 - arg * arg);
402#define OPERATION_LOGIC OperationAtanh
403#define FUNCTION atanh
404#include "unaryOverloads.tpp"
406#define OPERATION_LOGIC OperationAtanh
407#define FUNCTION atanhf
408#include "unaryOverloads.tpp"
410#define OPERATION_LOGIC OperationAtanh
411#define FUNCTION atanhl
412#include "unaryOverloads.tpp"
415 template<
typename T_Real>
422 template<
typename Arg>
428 template<
typename Arg>
436 return 1.0 / (3.0 * result * result);
447#define OPERATION_LOGIC OperationCbrt
449#include "unaryOverloads.tpp"
451#define OPERATION_LOGIC OperationCbrt
452#define FUNCTION cbrtf
453#include "unaryOverloads.tpp"
455#define OPERATION_LOGIC OperationCbrt
456#define FUNCTION cbrtl
457#include "unaryOverloads.tpp"
460 template<
typename Real,
typename Arg>
466 template<
typename Real,
typename Arg>
472 template<
typename Real,
typename Arg>
478 template<
typename T_Real>
485 template<
typename Arg>
491 template<
typename Arg>
502#define OPERATION_LOGIC OperationCos
504#include "unaryOverloads.tpp"
506#define OPERATION_LOGIC OperationCos
508#include "unaryOverloads.tpp"
510#define OPERATION_LOGIC OperationCos
512#include "unaryOverloads.tpp"
515 template<
typename T_Real>
522 template<
typename Arg>
528 template<
typename Arg>
539#define OPERATION_LOGIC OperationCosh
541#include "unaryOverloads.tpp"
543#define OPERATION_LOGIC OperationCosh
544#define FUNCTION coshf
545#include "unaryOverloads.tpp"
547#define OPERATION_LOGIC OperationCosh
548#define FUNCTION coshl
549#include "unaryOverloads.tpp"
552 template<
typename T_Real>
559 template<
typename Arg>
565 template<
typename Arg>
568 return 1.128379167095513 * exp(-(arg * arg));
576#define OPERATION_LOGIC OperationErf
578#include "unaryOverloads.tpp"
580#define OPERATION_LOGIC OperationErf
582#include "unaryOverloads.tpp"
584#define OPERATION_LOGIC OperationErf
586#include "unaryOverloads.tpp"
589 template<
typename T_Real>
596 template<
typename Arg>
602 template<
typename Arg>
605 return -1.128379167095513 * exp(-(arg * arg));
613#define OPERATION_LOGIC OperationErfc
615#include "unaryOverloads.tpp"
617#define OPERATION_LOGIC OperationErfc
618#define FUNCTION erfcf
619#include "unaryOverloads.tpp"
621#define OPERATION_LOGIC OperationErfc
622#define FUNCTION erfcl
623#include "unaryOverloads.tpp"
626 template<
typename T_Real>
633 template<
typename Arg>
639 template<
typename Arg>
650#define OPERATION_LOGIC OperationExp
652#include "unaryOverloads.tpp"
654#define OPERATION_LOGIC OperationExp
656#include "unaryOverloads.tpp"
658#define OPERATION_LOGIC OperationExp
660#include "unaryOverloads.tpp"
663 template<
typename Real,
typename Arg>
669 template<
typename Real,
typename Arg>
675 template<
typename Real,
typename Arg>
681 template<
typename Real,
typename Arg>
687 template<
typename Real,
typename Arg>
693 template<
typename Real,
typename Arg>
699 template<
typename Real,
typename Arg>
705 template<
typename T_Real>
712 template<
typename Arg>
718 template<
typename Arg>
734#define OPERATION_LOGIC OperationLog
736#include "unaryOverloads.tpp"
738#define OPERATION_LOGIC OperationLog
740#include "unaryOverloads.tpp"
742#define OPERATION_LOGIC OperationLog
744#include "unaryOverloads.tpp"
747 template<
typename T_Real>
754 template<
typename Arg>
760 template<
typename Arg>
768 return 0.434294481903252 / arg;
776#define OPERATION_LOGIC OperationLog10
777#define FUNCTION log10
778#include "unaryOverloads.tpp"
780#define OPERATION_LOGIC OperationLog10
781#define FUNCTION log10f
782#include "unaryOverloads.tpp"
784#define OPERATION_LOGIC OperationLog10
785#define FUNCTION log10l
786#include "unaryOverloads.tpp"
789 template<
typename T_Real>
796 template<
typename Arg>
802 template<
typename Arg>
810 return 1.0 / (arg + 1.0);
818#define OPERATION_LOGIC OperationLog1p
819#define FUNCTION log1p
820#include "unaryOverloads.tpp"
822#define OPERATION_LOGIC OperationLog1p
823#define FUNCTION log1pf
824#include "unaryOverloads.tpp"
826#define OPERATION_LOGIC OperationLog1p
827#define FUNCTION log1pl
828#include "unaryOverloads.tpp"
831 template<
typename T_Real>
838 template<
typename Arg>
844 template<
typename Arg>
852 return 1.442695040888963 / arg;
860#define OPERATION_LOGIC OperationLog2
862#include "unaryOverloads.tpp"
864#define OPERATION_LOGIC OperationLog2
865#define FUNCTION log2f
866#include "unaryOverloads.tpp"
868#define OPERATION_LOGIC OperationLog2
869#define FUNCTION log2l
870#include "unaryOverloads.tpp"
873 template<
typename Real,
typename Arg>
879 template<
typename Real,
typename Arg>
885 template<
typename Real,
typename Arg>
891 template<
typename T_Real>
898 template<
typename Arg>
904 template<
typename Arg>
915#define OPERATION_LOGIC OperationSin
917#include "unaryOverloads.tpp"
919#define OPERATION_LOGIC OperationSin
921#include "unaryOverloads.tpp"
923#define OPERATION_LOGIC OperationSin
925#include "unaryOverloads.tpp"
928 template<
typename T_Real>
935 template<
typename Arg>
941 template<
typename Arg>
952#define OPERATION_LOGIC OperationSinh
954#include "unaryOverloads.tpp"
956#define OPERATION_LOGIC OperationSinh
957#define FUNCTION sinhf
958#include "unaryOverloads.tpp"
960#define OPERATION_LOGIC OperationSinh
961#define FUNCTION sinhl
962#include "unaryOverloads.tpp"
965 template<
typename T_Real>
972 template<
typename Arg>
978 template<
typename Arg>
997#define OPERATION_LOGIC OperationSqrt
999#include "unaryOverloads.tpp"
1001#define OPERATION_LOGIC OperationSqrt
1002#define FUNCTION sqrtf
1003#include "unaryOverloads.tpp"
1005#define OPERATION_LOGIC OperationSqrt
1006#define FUNCTION sqrtl
1007#include "unaryOverloads.tpp"
1010 template<
typename T_Real>
1017 template<
typename Arg>
1023 template<
typename Arg>
1031 Real tmp = 1.0 / cos(arg);
1040#define OPERATION_LOGIC OperationTan
1042#include "unaryOverloads.tpp"
1044#define OPERATION_LOGIC OperationTan
1045#define FUNCTION tanf
1046#include "unaryOverloads.tpp"
1048#define OPERATION_LOGIC OperationTan
1049#define FUNCTION tanl
1050#include "unaryOverloads.tpp"
1053 template<
typename T_Real>
1060 template<
typename Arg>
1066 template<
typename Arg>
1069 return 1.0 - result * result;
1077#define OPERATION_LOGIC OperationTanh
1078#define FUNCTION tanh
1079#include "unaryOverloads.tpp"
1081#define OPERATION_LOGIC OperationTanh
1082#define FUNCTION tanhf
1083#include "unaryOverloads.tpp"
1085#define OPERATION_LOGIC OperationTanh
1086#define FUNCTION tanhl
1087#include "unaryOverloads.tpp"
1090 template<
typename T_Real>
1097 template<
typename Arg>
1103 template<
typename Arg>
1106 std::cout <<
"Derivative for gamma function only for positive arguments at the moment" << std::endl;
1118 if (arg <= 0.000001) {
1119 const Real eulerMascheroni = 0.57721566490153286060;
1120 diGamma = -eulerMascheroni - 1.0 / arg + 1.6449340668482264365 * arg;
1124 Real shiftBound = 8.5;
1126 Real shiftedValue = arg;
1127 while (shiftedValue < shiftBound) {
1128 diGamma -= 1.0 / shiftedValue;
1129 shiftedValue += 1.0;
1133 Real r = 1.0 / shiftedValue;
1134 diGamma += log(shiftedValue) - 0.5 * r;
1137 diGamma -= rSqr * (1.0 / 12.0 -
1138 rSqr * (1.0 / 120.0 - rSqr * (1.0 / 252.0 - rSqr * (1.0 / 240.0 - rSqr * (1.0 / 132.0)))));
1141 return diGamma * result;
1149#define OPERATION_LOGIC OperationTgamma
1150#define FUNCTION tgamma
1151#include "unaryOverloads.tpp"
1153#define OPERATION_LOGIC OperationTgamma
1154#define FUNCTION tgammaf
1155#include "unaryOverloads.tpp"
1157#define OPERATION_LOGIC OperationTgamma
1158#define FUNCTION tgammal
1159#include "unaryOverloads.tpp"
1167 template<
typename Real,
typename Arg>
1169 using std::to_string;
1225 using codi::isfinite;
1228 using codi::isnormal;
1260 using codi::tgammaf;
1261 using codi::tgammal;
#define CODI_INLINE
See codi::Config::ForcedInlines.
Definition config.h:457
#define CODI_DD(Type, Default)
Abbreviation for CODI_DECLARE_DEFAULT.
Definition macros.hpp:94
bool constexpr CheckExpressionArguments
Check for invalid arguments to expressions like division by zero.
Definition config.h:146
PassiveReal< Type > const & getPassiveValue(Type const &v)
Get the basic primal value of the type.
Definition realTraits.hpp:127
typename TraitsImplementation< Type >::PassiveReal PassiveReal
The original computation type, that was used in the application.
Definition realTraits.hpp:117
CoDiPack - Code Differentiation Package.
Definition codi.hpp:91
RealTraits::PassiveReal< Real > round(ExpressionInterface< Real, Arg > const &arg)
Function overload for round.
Definition unaryOperators.hpp:874
RealTraits::PassiveReal< Real > ceil(ExpressionInterface< Real, Arg > const &arg)
Function overload for ceil.
Definition unaryOperators.hpp:461
void CODI_UNUSED(Args const &...)
Disable unused warnings for an arbitrary number of arguments.
Definition macros.hpp:46
RealTraits::PassiveReal< Real > roundf(ExpressionInterface< Real, Arg > const &arg)
Function overload for roundf.
Definition unaryOperators.hpp:880
bool isfinite(ExpressionInterface< Real, Arg > const &arg)
Function overload for isfinite.
Definition unaryOperators.hpp:682
RealTraits::PassiveReal< Real > floorf(ExpressionInterface< Real, Arg > const &arg)
Function overload for floorf.
Definition unaryOperators.hpp:670
bool isnan(ExpressionInterface< Real, Arg > const &arg)
Function overload for isnan.
Definition unaryOperators.hpp:694
std::string to_string(ExpressionInterface< Real, Arg > const &arg)
Function overload for to_string.
Definition unaryOperators.hpp:1168
RealTraits::PassiveReal< Real > roundl(ExpressionInterface< Real, Arg > const &arg)
Function overload for roundl.
Definition unaryOperators.hpp:886
RealTraits::PassiveReal< Real > floorl(ExpressionInterface< Real, Arg > const &arg)
Function overload for floorl.
Definition unaryOperators.hpp:676
ExpressionInterface< Real, Arg > const & operator+(ExpressionInterface< Real, Arg > const &arg)
Function overload for operator +.
Definition unaryOperators.hpp:84
RealTraits::PassiveReal< Real > ceilf(ExpressionInterface< Real, Arg > const &arg)
Function overload for ceilf.
Definition unaryOperators.hpp:467
RealTraits::PassiveReal< Real > floor(ExpressionInterface< Real, Arg > const &arg)
Function overload for floor.
Definition unaryOperators.hpp:664
bool isinf(ExpressionInterface< Real, Arg > const &arg)
Function overload for isinf.
Definition unaryOperators.hpp:688
bool isnormal(ExpressionInterface< Real, Arg > const &arg)
Function overload for isnormal.
Definition unaryOperators.hpp:700
RealTraits::PassiveReal< Real > ceill(ExpressionInterface< Real, Arg > const &arg)
Function overload for ceill.
Definition unaryOperators.hpp:473
Base class for all CoDiPack expressions.
Definition expressionInterface.hpp:59
Impl const & cast() const
Cast to the implementation.
Definition expressionInterface.hpp:75
UnaryOperation implementation for abs.
Definition unaryOperators.hpp:127
static Real primal(Arg const &arg)
Definition unaryOperators.hpp:134
static std::string getMathRep()
Get the math symbol of the unary operation. E.g. sin() for functions.
Definition unaryOperators.hpp:152
T_Real Real
See BinaryOperation.
Definition unaryOperators.hpp:130
static RealTraits::PassiveReal< Real > gradient(Arg const &arg, Real const &result)
Definition unaryOperators.hpp:140
UnaryOperation implementation for acos.
Definition unaryOperators.hpp:174
static Real gradient(Arg const &arg, Real const &result)
Definition unaryOperators.hpp:187
static std::string getMathRep()
Get the math symbol of the unary operation. E.g. sin() for functions.
Definition unaryOperators.hpp:198
static Real primal(Arg const &arg)
Definition unaryOperators.hpp:181
T_Real Real
See BinaryOperation.
Definition unaryOperators.hpp:177
UnaryOperation implementation for acosh.
Definition unaryOperators.hpp:216
static Real gradient(Arg const &arg, Real const &result)
Definition unaryOperators.hpp:229
T_Real Real
See BinaryOperation.
Definition unaryOperators.hpp:219
static std::string getMathRep()
Get the math symbol of the unary operation. E.g. sin() for functions.
Definition unaryOperators.hpp:240
static Real primal(Arg const &arg)
Definition unaryOperators.hpp:223
UnaryOperation implementation for asin.
Definition unaryOperators.hpp:258
static Real primal(Arg const &arg)
Definition unaryOperators.hpp:265
static std::string getMathRep()
Get the math symbol of the unary operation. E.g. sin() for functions.
Definition unaryOperators.hpp:282
static Real gradient(Arg const &arg, Real const &result)
Definition unaryOperators.hpp:271
T_Real Real
See BinaryOperation.
Definition unaryOperators.hpp:261
UnaryOperation implementation for asinh.
Definition unaryOperators.hpp:300
static Real gradient(Arg const &arg, Real const &result)
Definition unaryOperators.hpp:313
static std::string getMathRep()
Get the math symbol of the unary operation. E.g. sin() for functions.
Definition unaryOperators.hpp:319
T_Real Real
See BinaryOperation.
Definition unaryOperators.hpp:303
static Real primal(Arg const &arg)
Definition unaryOperators.hpp:307
UnaryOperation implementation for atan.
Definition unaryOperators.hpp:337
static Real primal(Arg const &arg)
Definition unaryOperators.hpp:344
T_Real Real
See BinaryOperation.
Definition unaryOperators.hpp:340
static Real gradient(Arg const &arg, Real const &result)
Definition unaryOperators.hpp:350
static std::string getMathRep()
Get the math symbol of the unary operation. E.g. sin() for functions.
Definition unaryOperators.hpp:356
UnaryOperation implementation for atanh.
Definition unaryOperators.hpp:374
static Real gradient(Arg const &arg, Real const &result)
Definition unaryOperators.hpp:387
T_Real Real
See BinaryOperation.
Definition unaryOperators.hpp:377
static Real primal(Arg const &arg)
Definition unaryOperators.hpp:381
static std::string getMathRep()
Get the math symbol of the unary operation. E.g. sin() for functions.
Definition unaryOperators.hpp:398
UnaryOperation implementation for cbrt.
Definition unaryOperators.hpp:416
static std::string getMathRep()
Get the math symbol of the unary operation. E.g. sin() for functions.
Definition unaryOperators.hpp:443
T_Real Real
See BinaryOperation.
Definition unaryOperators.hpp:419
static Real gradient(Arg const &arg, Real const &result)
Definition unaryOperators.hpp:429
static Real primal(Arg const &arg)
Definition unaryOperators.hpp:423
UnaryOperation implementation for cos.
Definition unaryOperators.hpp:479
static std::string getMathRep()
Get the math symbol of the unary operation. E.g. sin() for functions.
Definition unaryOperators.hpp:498
T_Real Real
See BinaryOperation.
Definition unaryOperators.hpp:482
static Real primal(Arg const &arg)
Definition unaryOperators.hpp:486
static Real gradient(Arg const &arg, Real const &result)
Definition unaryOperators.hpp:492
UnaryOperation implementation for cosh.
Definition unaryOperators.hpp:516
T_Real Real
See BinaryOperation.
Definition unaryOperators.hpp:519
static std::string getMathRep()
Get the math symbol of the unary operation. E.g. sin() for functions.
Definition unaryOperators.hpp:535
static Real gradient(Arg const &arg, Real const &result)
Definition unaryOperators.hpp:529
static Real primal(Arg const &arg)
Definition unaryOperators.hpp:523
UnaryOperation implementation for erf.
Definition unaryOperators.hpp:553
static Real primal(Arg const &arg)
Definition unaryOperators.hpp:560
T_Real Real
See BinaryOperation.
Definition unaryOperators.hpp:556
static Real gradient(Arg const &arg, Real const &result)
Definition unaryOperators.hpp:566
static std::string getMathRep()
Get the math symbol of the unary operation. E.g. sin() for functions.
Definition unaryOperators.hpp:572
UnaryOperation implementation for erfc.
Definition unaryOperators.hpp:590
static Real primal(Arg const &arg)
Definition unaryOperators.hpp:597
static std::string getMathRep()
Get the math symbol of the unary operation. E.g. sin() for functions.
Definition unaryOperators.hpp:609
static Real gradient(Arg const &arg, Real const &result)
Definition unaryOperators.hpp:603
T_Real Real
See BinaryOperation.
Definition unaryOperators.hpp:593
UnaryOperation implementation for exp.
Definition unaryOperators.hpp:627
static Real primal(Arg const &arg)
Definition unaryOperators.hpp:634
static std::string getMathRep()
Get the math symbol of the unary operation. E.g. sin() for functions.
Definition unaryOperators.hpp:646
T_Real Real
See BinaryOperation.
Definition unaryOperators.hpp:630
static Real gradient(Arg const &arg, Real const &result)
Definition unaryOperators.hpp:640
UnaryOperation implementation for log10.
Definition unaryOperators.hpp:748
T_Real Real
See BinaryOperation.
Definition unaryOperators.hpp:751
static Real primal(Arg const &arg)
Definition unaryOperators.hpp:755
static std::string getMathRep()
Get the math symbol of the unary operation. E.g. sin() for functions.
Definition unaryOperators.hpp:772
static Real gradient(Arg const &arg, Real const &result)
Definition unaryOperators.hpp:761
UnaryOperation implementation for log1p.
Definition unaryOperators.hpp:790
static std::string getMathRep()
Get the math symbol of the unary operation. E.g. sin() for functions.
Definition unaryOperators.hpp:814
static Real gradient(Arg const &arg, Real const &result)
Definition unaryOperators.hpp:803
T_Real Real
See BinaryOperation.
Definition unaryOperators.hpp:793
static Real primal(Arg const &arg)
Definition unaryOperators.hpp:797
UnaryOperation implementation for log2.
Definition unaryOperators.hpp:832
static std::string getMathRep()
Get the math symbol of the unary operation. E.g. sin() for functions.
Definition unaryOperators.hpp:856
static Real primal(Arg const &arg)
Definition unaryOperators.hpp:839
static Real gradient(Arg const &arg, Real const &result)
Definition unaryOperators.hpp:845
T_Real Real
See BinaryOperation.
Definition unaryOperators.hpp:835
UnaryOperation implementation for log.
Definition unaryOperators.hpp:706
static Real primal(Arg const &arg)
Definition unaryOperators.hpp:713
static Real gradient(Arg const &arg, Real const &result)
Definition unaryOperators.hpp:719
T_Real Real
See BinaryOperation.
Definition unaryOperators.hpp:709
static std::string getMathRep()
Get the math symbol of the unary operation. E.g. sin() for functions.
Definition unaryOperators.hpp:730
UnaryOperation implementation for sin.
Definition unaryOperators.hpp:892
static Real primal(Arg const &arg)
Definition unaryOperators.hpp:899
static Real gradient(Arg const &arg, Real const &result)
Definition unaryOperators.hpp:905
static std::string getMathRep()
Get the math symbol of the unary operation. E.g. sin() for functions.
Definition unaryOperators.hpp:911
T_Real Real
See BinaryOperation.
Definition unaryOperators.hpp:895
UnaryOperation implementation for sinh.
Definition unaryOperators.hpp:929
T_Real Real
See BinaryOperation.
Definition unaryOperators.hpp:932
static std::string getMathRep()
Get the math symbol of the unary operation. E.g. sin() for functions.
Definition unaryOperators.hpp:948
static Real primal(Arg const &arg)
Definition unaryOperators.hpp:936
static Real gradient(Arg const &arg, Real const &result)
Definition unaryOperators.hpp:942
UnaryOperation implementation for sqrt.
Definition unaryOperators.hpp:966
static Real gradient(Arg const &arg, Real const &result)
Definition unaryOperators.hpp:979
static std::string getMathRep()
Get the math symbol of the unary operation. E.g. sin() for functions.
Definition unaryOperators.hpp:993
static Real primal(Arg const &arg)
Definition unaryOperators.hpp:973
T_Real Real
See BinaryOperation.
Definition unaryOperators.hpp:969
UnaryOperation implementation for tan.
Definition unaryOperators.hpp:1011
static Real primal(Arg const &arg)
Definition unaryOperators.hpp:1018
T_Real Real
See BinaryOperation.
Definition unaryOperators.hpp:1014
static Real gradient(Arg const &arg, Real const &result)
Definition unaryOperators.hpp:1024
static std::string getMathRep()
Get the math symbol of the unary operation. E.g. sin() for functions.
Definition unaryOperators.hpp:1036
UnaryOperation implementation for tanh.
Definition unaryOperators.hpp:1054
static Real gradient(Arg const &arg, Real const &result)
Definition unaryOperators.hpp:1067
static std::string getMathRep()
Get the math symbol of the unary operation. E.g. sin() for functions.
Definition unaryOperators.hpp:1073
static Real primal(Arg const &arg)
Definition unaryOperators.hpp:1061
T_Real Real
See BinaryOperation.
Definition unaryOperators.hpp:1057
UnaryOperation implementation for tgamma.
Definition unaryOperators.hpp:1091
static Real gradient(Arg const &arg, Real const &result)
Definition unaryOperators.hpp:1104
static Real primal(Arg const &arg)
Definition unaryOperators.hpp:1098
T_Real Real
See BinaryOperation.
Definition unaryOperators.hpp:1094
static std::string getMathRep()
Get the math symbol of the unary operation. E.g. sin() for functions.
Definition unaryOperators.hpp:1145
UnaryOperation implementation for operator -.
Definition unaryOperators.hpp:54
static RealTraits::PassiveReal< Real > gradient(Arg const &arg, Real const &result)
Definition unaryOperators.hpp:67
static Real primal(Arg const &arg)
Definition unaryOperators.hpp:61
T_Real Real
See BinaryOperation.
Definition unaryOperators.hpp:57
static std::string getMathRep()
Get the math symbol of the unary operation. E.g. sin() for functions.
Definition unaryOperators.hpp:74
Interface for implementing the logic for a UnaryExpression.
Definition unaryExpression.hpp:55