Stan  2.5.0
probability, sampling & optimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
boost_fpclassify.hpp
Go to the documentation of this file.
1 #ifndef STAN__AGRAD__REV__BOOST_FPCLASSIFY_HPP
2 #define STAN__AGRAD__REV__BOOST_FPCLASSIFY_HPP
3 
4 #include <boost/math/special_functions/fpclassify.hpp>
5 #include <stan/agrad/rev.hpp>
6 
7 namespace boost {
8 
9  namespace math {
10 
22  template <>
23  inline
24  int fpclassify(const stan::agrad::var& v) {
25  return (boost::math::fpclassify)(v.val());
26  }
27 
37  template <>
38  inline
39  bool isfinite(const stan::agrad::var& v) {
40  return (boost::math::isfinite)(v.val());
41  }
42 
52  template <>
53  inline
54  bool isinf(const stan::agrad::var& v) {
55  return (boost::math::isinf)(v.val());
56  }
57 
67  template <>
68  inline
69  bool isnan(const stan::agrad::var& v) {
70  return (boost::math::isnan)(v.val());
71  }
72 
82  template <>
83  inline
84  bool isnormal(const stan::agrad::var& v) {
85  return (boost::math::isnormal)(v.val());
86  }
87 
88  }
89 }
90 #endif
91 
bool isnan(const stan::agrad::var &v)
Checks if the given number is NaN.
bool isfinite(const stan::agrad::var &v)
Checks if the given number has finite value.
double val() const
Return the value of this variable.
Definition: var.hpp:209
int fpclassify(const stan::agrad::var &v)
Categorizes the given stan::agrad::var value.
bool isinf(const stan::agrad::var &v)
Checks if the given number is infinite.
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:27
bool isnormal(const stan::agrad::var &v)
Checks if the given number is normal.

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