Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ erfcx() [1/6]

template<typename T >
fvar< T > stan::math::erfcx ( const fvar< T > &  x)
inline

Return the scaled complementary error function of the argument.

The derivative comes from internal::erfcx_derivative. Below 4 it is 2 * x * erfcx(x) - 2 / sqrt(pi), which reuses the value. At 4 and above that difference cancels, so the tail rational supplies the derivative directly.

Template Parameters
Tinner type of the fvar
Parameters
xargument
Returns
scaled complementary error function of the argument

Definition at line 26 of file erfcx.hpp.