40#include "../../misc/exceptions.hpp"
42#include "../../traits/realTraits.hpp"
43#include "../computeExpression.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>
202 template<
typename Arg>
209 template<
typename Arg>
210 CODI_INLINE static void checkArgument(std::complex<Arg>
const&
arg) {
213 CODI_EXCEPTION(
"Argument of acos outside of C \\ {-1, 1}. (Value: %0.15e + %0.15e i)",
218#define OPERATION_LOGIC OperationAcos
220#include "unaryOverloads.tpp"
222#define OPERATION_LOGIC OperationAcos
223#define FUNCTION acosf
224#include "unaryOverloads.tpp"
226#define OPERATION_LOGIC OperationAcos
227#define FUNCTION acosl
228#include "unaryOverloads.tpp"
231 template<
typename T_Real>
238 template<
typename Arg>
244 template<
typename Arg>
260 template<
typename Arg>
267 template<
typename Arg>
268 CODI_INLINE static void checkArgument(std::complex<Arg>
const&
arg) {
270 CODI_EXCEPTION(
"Argument of acosh outside of C \\ {1, -1}. (Value: %0.15e + %0.15e i)",
275#define OPERATION_LOGIC OperationAcosh
276#define FUNCTION acosh
277#include "unaryOverloads.tpp"
279#define OPERATION_LOGIC OperationAcosh
280#define FUNCTION acoshf
281#include "unaryOverloads.tpp"
283#define OPERATION_LOGIC OperationAcosh
284#define FUNCTION acoshl
285#include "unaryOverloads.tpp"
288 template<
typename T_Real>
295 template<
typename Arg>
301 template<
typename Arg>
317 template<
typename Arg>
324 template<
typename Arg>
325 CODI_INLINE static void checkArgument(std::complex<Arg>
const&
arg) {
328 CODI_EXCEPTION(
"Argument of asin outside of C \\ {1, -1}. (Value: %0.15e + %0.15e i)",
333#define OPERATION_LOGIC OperationAsin
335#include "unaryOverloads.tpp"
337#define OPERATION_LOGIC OperationAsin
338#define FUNCTION asinf
339#include "unaryOverloads.tpp"
341#define OPERATION_LOGIC OperationAsin
342#define FUNCTION asinl
343#include "unaryOverloads.tpp"
346 template<
typename T_Real>
353 template<
typename Arg>
359 template<
typename Arg>
377 template<
typename Arg>
383 template<
typename Arg>
384 CODI_INLINE static void checkArgument(std::complex<Arg>
const&
arg) {
386 CODI_EXCEPTION(
"Argument of asinh outside of C \\ {i, -i}. (Value: %0.15e + %0.15e i)",
391#define OPERATION_LOGIC OperationAsinh
392#define FUNCTION asinh
393#include "unaryOverloads.tpp"
395#define OPERATION_LOGIC OperationAsinh
396#define FUNCTION asinhf
397#include "unaryOverloads.tpp"
399#define OPERATION_LOGIC OperationAsinh
400#define FUNCTION asinhl
401#include "unaryOverloads.tpp"
404 template<
typename T_Real>
411 template<
typename Arg>
417 template<
typename Arg>
425 return 1.0 / (1.0 +
arg *
arg);
435 template<
typename Arg>
441 template<
typename Arg>
442 CODI_INLINE static void checkArgument(std::complex<Arg>
const&
arg) {
444 CODI_EXCEPTION(
"Argument of atan outside of C \\ {i, -i}. (Value: %0.15e + %0.15e i)",
449#define OPERATION_LOGIC OperationAtan
451#include "unaryOverloads.tpp"
453#define OPERATION_LOGIC OperationAtan
454#define FUNCTION atanf
455#include "unaryOverloads.tpp"
457#define OPERATION_LOGIC OperationAtan
458#define FUNCTION atanl
459#include "unaryOverloads.tpp"
462 template<
typename T_Real>
469 template<
typename Arg>
475 template<
typename Arg>
481 return 1.0 / (1.0 -
arg *
arg);
491 template<
typename Arg>
498 template<
typename Arg>
499 CODI_INLINE static void checkArgument(std::complex<Arg>
const&
arg) {
502 CODI_EXCEPTION(
"Argument of atanh outside of C \\ (-1, 1). (Value: %0.15e + %0.15e i)",
507#define OPERATION_LOGIC OperationAtanh
508#define FUNCTION atanh
509#include "unaryOverloads.tpp"
511#define OPERATION_LOGIC OperationAtanh
512#define FUNCTION atanhf
513#include "unaryOverloads.tpp"
515#define OPERATION_LOGIC OperationAtanh
516#define FUNCTION atanhl
517#include "unaryOverloads.tpp"
520 template<
typename T_Real>
527 template<
typename Arg>
533 template<
typename Arg>
541 return 1.0 / (3.0 * result * result);
552#define OPERATION_LOGIC OperationCbrt
554#include "unaryOverloads.tpp"
556#define OPERATION_LOGIC OperationCbrt
557#define FUNCTION cbrtf
558#include "unaryOverloads.tpp"
560#define OPERATION_LOGIC OperationCbrt
561#define FUNCTION cbrtl
562#include "unaryOverloads.tpp"
565 template<
typename Real,
typename Arg>
571 template<
typename Real,
typename Arg>
577 template<
typename Real,
typename Arg>
583 template<
typename T_Real>
590 template<
typename Arg>
596 template<
typename Arg>
607#define OPERATION_LOGIC OperationCos
609#include "unaryOverloads.tpp"
611#define OPERATION_LOGIC OperationCos
613#include "unaryOverloads.tpp"
615#define OPERATION_LOGIC OperationCos
617#include "unaryOverloads.tpp"
620 template<
typename T_Real>
627 template<
typename Arg>
633 template<
typename Arg>
644#define OPERATION_LOGIC OperationCosh
646#include "unaryOverloads.tpp"
648#define OPERATION_LOGIC OperationCosh
649#define FUNCTION coshf
650#include "unaryOverloads.tpp"
652#define OPERATION_LOGIC OperationCosh
653#define FUNCTION coshl
654#include "unaryOverloads.tpp"
657 template<
typename T_Real>
664 template<
typename Arg>
670 template<
typename Arg>
673 return 1.128379167095513 *
exp(-(
arg *
arg));
681#define OPERATION_LOGIC OperationErf
683#include "unaryOverloads.tpp"
685#define OPERATION_LOGIC OperationErf
687#include "unaryOverloads.tpp"
689#define OPERATION_LOGIC OperationErf
691#include "unaryOverloads.tpp"
694 template<
typename T_Real>
701 template<
typename Arg>
707 template<
typename Arg>
710 return -1.128379167095513 *
exp(-(
arg *
arg));
718#define OPERATION_LOGIC OperationErfc
720#include "unaryOverloads.tpp"
722#define OPERATION_LOGIC OperationErfc
723#define FUNCTION erfcf
724#include "unaryOverloads.tpp"
726#define OPERATION_LOGIC OperationErfc
727#define FUNCTION erfcl
728#include "unaryOverloads.tpp"
731 template<
typename T_Real>
738 template<
typename Arg>
744 template<
typename Arg>
755#define OPERATION_LOGIC OperationExp
757#include "unaryOverloads.tpp"
759#define OPERATION_LOGIC OperationExp
761#include "unaryOverloads.tpp"
763#define OPERATION_LOGIC OperationExp
765#include "unaryOverloads.tpp"
768 template<
typename Real,
typename Arg>
774 template<
typename Real,
typename Arg>
780 template<
typename Real,
typename Arg>
786 template<
typename Real,
typename Arg>
792 template<
typename Real,
typename Arg>
798 template<
typename Real,
typename Arg>
804 template<
typename Real,
typename Arg>
810 template<
typename T_Real>
817 template<
typename Arg>
823 template<
typename Arg>
839 template<
typename Arg>
846 template<
typename Arg>
847 CODI_INLINE static void checkArgument(std::complex<Arg>
const&
arg) {
853#define OPERATION_LOGIC OperationLog
855#include "unaryOverloads.tpp"
857#define OPERATION_LOGIC OperationLog
859#include "unaryOverloads.tpp"
861#define OPERATION_LOGIC OperationLog
863#include "unaryOverloads.tpp"
866 template<
typename T_Real>
873 template<
typename Arg>
879 template<
typename Arg>
885 return 0.434294481903252 /
arg;
894 template<
typename Arg>
901 template<
typename Arg>
902 CODI_INLINE static void checkArgument(std::complex<Arg>
const&
arg) {
908#define OPERATION_LOGIC OperationLog10
909#define FUNCTION log10
910#include "unaryOverloads.tpp"
912#define OPERATION_LOGIC OperationLog10
913#define FUNCTION log10f
914#include "unaryOverloads.tpp"
916#define OPERATION_LOGIC OperationLog10
917#define FUNCTION log10l
918#include "unaryOverloads.tpp"
921 template<
typename T_Real>
928 template<
typename Arg>
934 template<
typename Arg>
942 return 1.0 / (
arg + 1.0);
950#define OPERATION_LOGIC OperationLog1p
951#define FUNCTION log1p
952#include "unaryOverloads.tpp"
954#define OPERATION_LOGIC OperationLog1p
955#define FUNCTION log1pf
956#include "unaryOverloads.tpp"
958#define OPERATION_LOGIC OperationLog1p
959#define FUNCTION log1pl
960#include "unaryOverloads.tpp"
963 template<
typename T_Real>
970 template<
typename Arg>
976 template<
typename Arg>
984 return 1.442695040888963 /
arg;
992#define OPERATION_LOGIC OperationLog2
994#include "unaryOverloads.tpp"
996#define OPERATION_LOGIC OperationLog2
997#define FUNCTION log2f
998#include "unaryOverloads.tpp"
1000#define OPERATION_LOGIC OperationLog2
1001#define FUNCTION log2l
1002#include "unaryOverloads.tpp"
1005 template<
typename Real,
typename Arg>
1007 return round(
arg.cast().getValue());
1011 template<
typename Real,
typename Arg>
1013 return round(
arg.cast().getValue());
1017 template<
typename Real,
typename Arg>
1019 return round(
arg.cast().getValue());
1023 template<
typename T_Real>
1030 template<
typename Arg>
1036 template<
typename Arg>
1047#define OPERATION_LOGIC OperationSin
1049#include "unaryOverloads.tpp"
1051#define OPERATION_LOGIC OperationSin
1052#define FUNCTION sinf
1053#include "unaryOverloads.tpp"
1055#define OPERATION_LOGIC OperationSin
1056#define FUNCTION sinl
1057#include "unaryOverloads.tpp"
1060 template<
typename T_Real>
1067 template<
typename Arg>
1073 template<
typename Arg>
1084#define OPERATION_LOGIC OperationSinh
1085#define FUNCTION sinh
1086#include "unaryOverloads.tpp"
1088#define OPERATION_LOGIC OperationSinh
1089#define FUNCTION sinhf
1090#include "unaryOverloads.tpp"
1092#define OPERATION_LOGIC OperationSinh
1093#define FUNCTION sinhl
1094#include "unaryOverloads.tpp"
1097 template<
typename T_Real>
1104 template<
typename Arg>
1110 template<
typename Arg>
1115 if (result != 0.0) {
1116 return 0.5 / result;
1128 template<
typename Arg>
1135 template<
typename Arg>
1136 CODI_INLINE static void checkArgument(std::complex<Arg>
const&
arg) {
1140#define OPERATION_LOGIC OperationSqrt
1141#define FUNCTION sqrt
1142#include "unaryOverloads.tpp"
1144#define OPERATION_LOGIC OperationSqrt
1145#define FUNCTION sqrtf
1146#include "unaryOverloads.tpp"
1148#define OPERATION_LOGIC OperationSqrt
1149#define FUNCTION sqrtl
1150#include "unaryOverloads.tpp"
1153 template<
typename T_Real>
1160 template<
typename Arg>
1166 template<
typename Arg>
1182 template<
typename Arg>
1189#define OPERATION_LOGIC OperationTan
1191#include "unaryOverloads.tpp"
1193#define OPERATION_LOGIC OperationTan
1194#define FUNCTION tanf
1195#include "unaryOverloads.tpp"
1197#define OPERATION_LOGIC OperationTan
1198#define FUNCTION tanl
1199#include "unaryOverloads.tpp"
1202 template<
typename T_Real>
1209 template<
typename Arg>
1215 template<
typename Arg>
1218 return 1.0 - result * result;
1226#define OPERATION_LOGIC OperationTanh
1227#define FUNCTION tanh
1228#include "unaryOverloads.tpp"
1230#define OPERATION_LOGIC OperationTanh
1231#define FUNCTION tanhf
1232#include "unaryOverloads.tpp"
1234#define OPERATION_LOGIC OperationTanh
1235#define FUNCTION tanhl
1236#include "unaryOverloads.tpp"
1239 template<
typename T_Real>
1246 template<
typename Arg>
1252 template<
typename Arg>
1255 std::cout <<
"Derivative for gamma function only for positive arguments at the moment" << std::endl;
1267 if (
arg <= 0.000001) {
1268 const Real eulerMascheroni = 0.57721566490153286060;
1269 diGamma = -eulerMascheroni - 1.0 /
arg + 1.6449340668482264365 *
arg;
1273 Real shiftBound = 8.5;
1276 while (shiftedValue < shiftBound) {
1277 diGamma -= 1.0 / shiftedValue;
1278 shiftedValue += 1.0;
1282 Real r = 1.0 / shiftedValue;
1283 diGamma +=
log(shiftedValue) - 0.5 * r;
1286 diGamma -= rSqr * (1.0 / 12.0 -
1287 rSqr * (1.0 / 120.0 - rSqr * (1.0 / 252.0 - rSqr * (1.0 / 240.0 - rSqr * (1.0 / 132.0)))));
1290 return diGamma * result;
1298#define OPERATION_LOGIC OperationTgamma
1299#define FUNCTION tgamma
1300#include "unaryOverloads.tpp"
1302#define OPERATION_LOGIC OperationTgamma
1303#define FUNCTION tgammaf
1304#include "unaryOverloads.tpp"
1306#define OPERATION_LOGIC OperationTgamma
1307#define FUNCTION tgammal
1308#include "unaryOverloads.tpp"
1316 template<
typename Real,
typename Arg>
1318 using std::to_string;
#define CODI_INLINE
See codi::Config::ForcedInlines.
Definition config.h:469
#define CODI_DD(Type, Default)
Abbreviation for CODI_DECLARE_DEFAULT.
Definition macros.hpp:96
bool constexpr CheckExpressionArguments
Check for invalid arguments to expressions like division by zero.
Definition config.h:146
inlinePassiveReal< Type > getPassiveValue(Type const &v)
Get the basic primal value of the type.
Definition realTraits.hpp:133
typename TraitsImplementation< Type >::PassiveReal PassiveReal
The original computation type that was used in the application.
Definition realTraits.hpp:123
CoDiPack - Code Differentiation Package.
Definition codi.hpp:94
inlineauto erff(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlinebool isinf(ExpressionInterface< Real, Arg > const &arg)
Function overload for isinf.
Definition unaryOperators.hpp:793
inlineauto logl(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlinestd::string to_string(ExpressionInterface< Real, Arg > const &arg)
Function overload for to_string.
Definition unaryOperators.hpp:1317
inlineauto sqrtl(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto acosl(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto tgammal(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto acoshf(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineRealTraits::PassiveReal< Real > floorl(ExpressionInterface< Real, Arg > const &arg)
Function overload for floorl.
Definition unaryOperators.hpp:781
inlineauto erfcl(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto erf(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto fabsl(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto log10f(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto exp(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto tanf(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineRealTraits::PassiveReal< Real > round(ExpressionInterface< Real, Arg > const &arg)
Function overload for round.
Definition unaryOperators.hpp:1006
inlineauto sinh(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineRealTraits::PassiveReal< Real > roundl(ExpressionInterface< Real, Arg > const &arg)
Function overload for roundl.
Definition unaryOperators.hpp:1018
inlinebool isnormal(ExpressionInterface< Real, Arg > const &arg)
Function overload for isnormal.
Definition unaryOperators.hpp:805
inlineauto log(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto sinhl(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto asinhl(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto atanhf(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto atan(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto sqrtf(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto sinl(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineRealTraits::PassiveReal< Real > ceil(ExpressionInterface< Real, Arg > const &arg)
Function overload for ceil.
Definition unaryOperators.hpp:566
inlineauto asin(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto log1p(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto atanhl(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto acos(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto asinh(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto erfl(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto cos(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineRealTraits::PassiveReal< Real > ceill(ExpressionInterface< Real, Arg > const &arg)
Function overload for ceill.
Definition unaryOperators.hpp:578
inlineauto coshf(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto tanh(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto cbrt(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto cosf(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto acosf(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto tgammaf(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto tanhl(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto log2f(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto log10(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto sinf(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto atanf(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto log2l(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto coshl(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto expl(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto asinl(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto cbrtl(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto operator+(ExpressionInterface< std::complex< Real >, ArgA > const &argA, ExpressionInterface< Real, ArgB > const &argB)
Function overload for FUNCTION(complex, real).
Definition allOperators.hpp:92
inlineauto cosh(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto imag(ExpressionInterface< std::complex< Real >, Arg > const &arg)
Function overload for FUNCTION.
Definition allOperators.hpp:75
inlineauto abs(ExpressionInterface< std::complex< Real >, Arg > const &arg)
Function overload for FUNCTION.
Definition allOperators.hpp:75
inlineauto expf(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineRealTraits::PassiveReal< Real > roundf(ExpressionInterface< Real, Arg > const &arg)
Function overload for roundf.
Definition unaryOperators.hpp:1012
inlineauto log10l(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto cosl(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto acoshl(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto sinhf(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlinebool isnan(ExpressionInterface< Real, Arg > const &arg)
Function overload for isnan.
Definition unaryOperators.hpp:799
inlineauto atanh(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto atanl(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto cbrtf(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto sqrt(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto tan(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto real(ExpressionInterface< std::complex< Real >, Arg > const &arg)
Function overload for FUNCTION.
Definition allOperators.hpp:75
inlineauto log1pl(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto tgamma(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto erfcf(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlinevoid CODI_UNUSED(Args const &...)
Disable unused warnings for an arbitrary number of arguments.
Definition macros.hpp:54
inlineauto arg(ExpressionInterface< std::complex< Real >, Arg > const &arg)
Function overload for FUNCTION.
Definition allOperators.hpp:75
inlineRealTraits::PassiveReal< Real > floor(ExpressionInterface< Real, Arg > const &arg)
Function overload for floor.
Definition unaryOperators.hpp:769
inlineauto tanl(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto log2(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto sin(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto log1pf(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto fabsf(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto acosh(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto asinf(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto tanhf(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto fabs(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineauto logf(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineRealTraits::PassiveReal< Real > ceilf(ExpressionInterface< Real, Arg > const &arg)
Function overload for ceilf.
Definition unaryOperators.hpp:572
inlineauto erfc(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlineRealTraits::PassiveReal< Real > floorf(ExpressionInterface< Real, Arg > const &arg)
Function overload for floorf.
Definition unaryOperators.hpp:775
inlineauto asinhf(ExpressionInterface< Real, Arg > const &arg)
Function overload for FUNCTION.
Definition unaryOperators.hpp:71
inlinebool isfinite(ExpressionInterface< Real, Arg > const &arg)
Function overload for isfinite.
Definition unaryOperators.hpp:787
Base class for all CoDiPack expressions.
Definition expressionInterface.hpp:60
UnaryJacobianOperation implementation for abs.
Definition unaryOperators.hpp:127
static inlineReal primal(Arg const &arg)
Definition unaryOperators.hpp:134
T_Real Real
See UnaryJacobianOperation.
Definition unaryOperators.hpp:130
static inlinestd::string getMathRep()
Get the math symbol of the operation. E.g. + for operators and pow() for functions.
Definition unaryOperators.hpp:152
static inlineRealTraits::PassiveReal< Real > gradient(Arg const &arg, Real const &result)
Compute .
Definition unaryOperators.hpp:140
UnaryJacobianOperation implementation for acos.
Definition unaryOperators.hpp:174
static inlineReal primal(Arg const &arg)
Definition unaryOperators.hpp:181
static inlinestd::string getMathRep()
Get the math symbol of the operation. E.g. + for operators and pow() for functions.
Definition unaryOperators.hpp:196
T_Real Real
See UnaryJacobianOperation.
Definition unaryOperators.hpp:177
static inlineReal gradient(Arg const &arg, Real const &result)
Compute .
Definition unaryOperators.hpp:187
UnaryJacobianOperation implementation for acosh.
Definition unaryOperators.hpp:232
T_Real Real
See UnaryJacobianOperation.
Definition unaryOperators.hpp:235
static inlinestd::string getMathRep()
Get the math symbol of the operation. E.g. + for operators and pow() for functions.
Definition unaryOperators.hpp:254
static inlineReal gradient(Arg const &arg, Real const &result)
Compute .
Definition unaryOperators.hpp:245
static inlineReal primal(Arg const &arg)
Definition unaryOperators.hpp:239
UnaryJacobianOperation implementation for asin.
Definition unaryOperators.hpp:289
static inlinestd::string getMathRep()
Get the math symbol of the operation. E.g. + for operators and pow() for functions.
Definition unaryOperators.hpp:311
static inlineReal primal(Arg const &arg)
Definition unaryOperators.hpp:296
T_Real Real
See UnaryJacobianOperation.
Definition unaryOperators.hpp:292
static inlineReal gradient(Arg const &arg, Real const &result)
Compute .
Definition unaryOperators.hpp:302
UnaryJacobianOperation implementation for asinh.
Definition unaryOperators.hpp:347
static inlineReal gradient(Arg const &arg, Real const &result)
Compute .
Definition unaryOperators.hpp:360
T_Real Real
See UnaryJacobianOperation.
Definition unaryOperators.hpp:350
static inlinestd::string getMathRep()
Get the math symbol of the operation. E.g. + for operators and pow() for functions.
Definition unaryOperators.hpp:371
static inlineReal primal(Arg const &arg)
Definition unaryOperators.hpp:354
UnaryJacobianOperation implementation for atan.
Definition unaryOperators.hpp:405
static inlineReal gradient(Arg const &arg, Real const &result)
Compute .
Definition unaryOperators.hpp:418
T_Real Real
See UnaryJacobianOperation.
Definition unaryOperators.hpp:408
static inlineReal primal(Arg const &arg)
Definition unaryOperators.hpp:412
static inlinestd::string getMathRep()
Get the math symbol of the operation. E.g. + for operators and pow() for functions.
Definition unaryOperators.hpp:429
UnaryJacobianOperation implementation for atanh.
Definition unaryOperators.hpp:463
static inlineReal primal(Arg const &arg)
Definition unaryOperators.hpp:470
static inlinestd::string getMathRep()
Get the math symbol of the operation. E.g. + for operators and pow() for functions.
Definition unaryOperators.hpp:485
T_Real Real
See UnaryJacobianOperation.
Definition unaryOperators.hpp:466
static inlineReal gradient(Arg const &arg, Real const &result)
Compute .
Definition unaryOperators.hpp:476
UnaryJacobianOperation implementation for cbrt.
Definition unaryOperators.hpp:521
static inlinestd::string getMathRep()
Get the math symbol of the operation. E.g. + for operators and pow() for functions.
Definition unaryOperators.hpp:548
static inlineReal primal(Arg const &arg)
Definition unaryOperators.hpp:528
T_Real Real
See UnaryJacobianOperation.
Definition unaryOperators.hpp:524
static inlineReal gradient(Arg const &arg, Real const &result)
Compute .
Definition unaryOperators.hpp:534
UnaryJacobianOperation implementation for cos.
Definition unaryOperators.hpp:584
static inlinestd::string getMathRep()
Get the math symbol of the operation. E.g. + for operators and pow() for functions.
Definition unaryOperators.hpp:603
static inlineReal gradient(Arg const &arg, Real const &result)
Compute .
Definition unaryOperators.hpp:597
static inlineReal primal(Arg const &arg)
Definition unaryOperators.hpp:591
T_Real Real
See UnaryJacobianOperation.
Definition unaryOperators.hpp:587
UnaryJacobianOperation implementation for cosh.
Definition unaryOperators.hpp:621
T_Real Real
See UnaryJacobianOperation.
Definition unaryOperators.hpp:624
static inlineReal primal(Arg const &arg)
Definition unaryOperators.hpp:628
static inlineReal gradient(Arg const &arg, Real const &result)
Compute .
Definition unaryOperators.hpp:634
static inlinestd::string getMathRep()
Get the math symbol of the operation. E.g. + for operators and pow() for functions.
Definition unaryOperators.hpp:640
UnaryJacobianOperation implementation for erf.
Definition unaryOperators.hpp:658
static inlineReal gradient(Arg const &arg, Real const &result)
Compute .
Definition unaryOperators.hpp:671
static inlinestd::string getMathRep()
Get the math symbol of the operation. E.g. + for operators and pow() for functions.
Definition unaryOperators.hpp:677
static inlineReal primal(Arg const &arg)
Definition unaryOperators.hpp:665
T_Real Real
See UnaryJacobianOperation.
Definition unaryOperators.hpp:661
UnaryJacobianOperation implementation for erfc.
Definition unaryOperators.hpp:695
static inlineReal gradient(Arg const &arg, Real const &result)
Compute .
Definition unaryOperators.hpp:708
static inlinestd::string getMathRep()
Get the math symbol of the operation. E.g. + for operators and pow() for functions.
Definition unaryOperators.hpp:714
static inlineReal primal(Arg const &arg)
Definition unaryOperators.hpp:702
T_Real Real
See UnaryJacobianOperation.
Definition unaryOperators.hpp:698
UnaryJacobianOperation implementation for exp.
Definition unaryOperators.hpp:732
static inlinestd::string getMathRep()
Get the math symbol of the operation. E.g. + for operators and pow() for functions.
Definition unaryOperators.hpp:751
T_Real Real
See UnaryJacobianOperation.
Definition unaryOperators.hpp:735
static inlineReal primal(Arg const &arg)
Definition unaryOperators.hpp:739
static inlineReal gradient(Arg const &arg, Real const &result)
Compute .
Definition unaryOperators.hpp:745
UnaryJacobianOperation implementation for log10.
Definition unaryOperators.hpp:867
T_Real Real
See UnaryJacobianOperation.
Definition unaryOperators.hpp:870
static inlineReal gradient(Arg const &arg, Real const &result)
Compute .
Definition unaryOperators.hpp:880
static inlineReal primal(Arg const &arg)
Definition unaryOperators.hpp:874
static inlinestd::string getMathRep()
Get the math symbol of the operation. E.g. + for operators and pow() for functions.
Definition unaryOperators.hpp:889
UnaryJacobianOperation implementation for log1p.
Definition unaryOperators.hpp:922
static inlinestd::string getMathRep()
Get the math symbol of the operation. E.g. + for operators and pow() for functions.
Definition unaryOperators.hpp:946
T_Real Real
See UnaryJacobianOperation.
Definition unaryOperators.hpp:925
static inlineReal primal(Arg const &arg)
Definition unaryOperators.hpp:929
static inlineReal gradient(Arg const &arg, Real const &result)
Compute .
Definition unaryOperators.hpp:935
UnaryJacobianOperation implementation for log2.
Definition unaryOperators.hpp:964
static inlineReal primal(Arg const &arg)
Definition unaryOperators.hpp:971
static inlineReal gradient(Arg const &arg, Real const &result)
Compute .
Definition unaryOperators.hpp:977
static inlinestd::string getMathRep()
Get the math symbol of the operation. E.g. + for operators and pow() for functions.
Definition unaryOperators.hpp:988
T_Real Real
See UnaryJacobianOperation.
Definition unaryOperators.hpp:967
UnaryJacobianOperation implementation for log.
Definition unaryOperators.hpp:811
T_Real Real
See UnaryJacobianOperation.
Definition unaryOperators.hpp:814
static inlineReal primal(Arg const &arg)
Definition unaryOperators.hpp:818
static inlineReal gradient(Arg const &arg, Real const &result)
Compute .
Definition unaryOperators.hpp:824
static inlinestd::string getMathRep()
Get the math symbol of the operation. E.g. + for operators and pow() for functions.
Definition unaryOperators.hpp:833
UnaryJacobianOperation implementation for sin.
Definition unaryOperators.hpp:1024
static inlinestd::string getMathRep()
Get the math symbol of the operation. E.g. + for operators and pow() for functions.
Definition unaryOperators.hpp:1043
static inlineReal gradient(Arg const &arg, Real const &result)
Compute .
Definition unaryOperators.hpp:1037
static inlineReal primal(Arg const &arg)
Definition unaryOperators.hpp:1031
T_Real Real
See UnaryJacobianOperation.
Definition unaryOperators.hpp:1027
UnaryJacobianOperation implementation for sinh.
Definition unaryOperators.hpp:1061
static inlinestd::string getMathRep()
Get the math symbol of the operation. E.g. + for operators and pow() for functions.
Definition unaryOperators.hpp:1080
T_Real Real
See UnaryJacobianOperation.
Definition unaryOperators.hpp:1064
static inlineReal gradient(Arg const &arg, Real const &result)
Compute .
Definition unaryOperators.hpp:1074
static inlineReal primal(Arg const &arg)
Definition unaryOperators.hpp:1068
UnaryJacobianOperation implementation for sqrt.
Definition unaryOperators.hpp:1098
static inlineReal primal(Arg const &arg)
Definition unaryOperators.hpp:1105
static inlineReal gradient(Arg const &arg, Real const &result)
Compute .
Definition unaryOperators.hpp:1111
T_Real Real
See UnaryJacobianOperation.
Definition unaryOperators.hpp:1101
static inlinestd::string getMathRep()
Get the math symbol of the operation. E.g. + for operators and pow() for functions.
Definition unaryOperators.hpp:1123
UnaryJacobianOperation implementation for tan.
Definition unaryOperators.hpp:1154
static inlinestd::string getMathRep()
Get the math symbol of the operation. E.g. + for operators and pow() for functions.
Definition unaryOperators.hpp:1177
T_Real Real
See UnaryJacobianOperation.
Definition unaryOperators.hpp:1157
static inlineReal primal(Arg const &arg)
Definition unaryOperators.hpp:1161
static inlineReal gradient(Arg const &arg, Real const &result)
Compute .
Definition unaryOperators.hpp:1167
UnaryJacobianOperation implementation for tanh.
Definition unaryOperators.hpp:1203
static inlinestd::string getMathRep()
Get the math symbol of the operation. E.g. + for operators and pow() for functions.
Definition unaryOperators.hpp:1222
static inlineReal gradient(Arg const &arg, Real const &result)
Compute .
Definition unaryOperators.hpp:1216
T_Real Real
See UnaryJacobianOperation.
Definition unaryOperators.hpp:1206
static inlineReal primal(Arg const &arg)
Definition unaryOperators.hpp:1210
UnaryJacobianOperation implementation for tgamma.
Definition unaryOperators.hpp:1240
static inlineReal primal(Arg const &arg)
Definition unaryOperators.hpp:1247
static inlinestd::string getMathRep()
Get the math symbol of the operation. E.g. + for operators and pow() for functions.
Definition unaryOperators.hpp:1294
static inlineReal gradient(Arg const &arg, Real const &result)
Compute .
Definition unaryOperators.hpp:1253
T_Real Real
See UnaryJacobianOperation.
Definition unaryOperators.hpp:1243
UnaryJacobianOperation implementation for operator -.
Definition unaryOperators.hpp:54
static inlinestd::string getMathRep()
Get the math symbol of the operation. E.g. + for operators and pow() for functions.
Definition unaryOperators.hpp:74
static inlineRealTraits::PassiveReal< Real > gradient(Arg const &arg, Real const &result)
Compute .
Definition unaryOperators.hpp:67
T_Real Real
See UnaryJacobianOperation.
Definition unaryOperators.hpp:57
static inlineReal primal(Arg const &arg)
Definition unaryOperators.hpp:61
Implements UnaryOperation for functions where the gradient can be computed and transposed.
Definition computeExpression.hpp:149