I'm implementing a matrix exponential function in the language Stan (
mc-stan.org), based on Eigen's implementation in Unsupported. I wanted to ask about the following C macro in this
file (lines 345 - 353).
#if LDBL_MANT_DIG > 112 // rarely happens
typedef typename traits<MatrixType>::Scalar Scalar;
typedef typename NumTraits<Scalar>::Real RealScalar;
typedef typename std::complex<RealScalar> ComplexScalar;
if (sizeof(RealScalar) > 14) {
result = arg.matrixFunction(internal::stem_function_exp<ComplexScalar>);
return;
}
#endif
I understand it is meant for the case where the machine bites is higher than 112, but I don't get what
result = arg.matrixFunction(internal::stem_function_exp<ComplexScalar>;
does. Looking at stem_function_exp, the function seems to only return std::exp.
Clarification would be very helpful. Thank you very much!
Best,
Charles