Stan  2.5.0
probability, sampling & optimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
erfc.hpp
Go to the documentation of this file.
1 #ifndef STAN__AGRAD__FWD__FUNCTIONS__ERFC_HPP
2 #define STAN__AGRAD__FWD__FUNCTIONS__ERFC_HPP
3 
4 #include <math.h>
6 #include <stan/meta/traits.hpp>
9 
10 namespace stan {
11 
12  namespace agrad {
13 
14  template <typename T>
15  inline
16  fvar<T>
17  erfc(const fvar<T>& x) {
21  using stan::math::square;
22  return fvar<T>(erfc(x.val_), -x.d_ * exp(-square(x.val_))
24  }
25  }
26 }
27 #endif
T square(const T x)
Return the square of the specified argument.
Definition: square.hpp:22
fvar< T > erfc(const fvar< T > &x)
Definition: erfc.hpp:17
fvar< T > square(const fvar< T > &x)
Definition: square.hpp:15
const double TWO_OVER_SQRT_PI
Definition: constants.hpp:146
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:15
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:16
var erfc(const stan::agrad::var &a)
The complementary error function for variables (C99).
Definition: erfc.hpp:63

     [ Stan Home Page ] © 2011–2014, Stan Development Team.