Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
stan
math
fwd
scal
fun
log.hpp
Go to the documentation of this file.
1
#ifndef STAN_MATH_FWD_SCAL_FUN_LOG_HPP
2
#define STAN_MATH_FWD_SCAL_FUN_LOG_HPP
3
4
#include <
stan/math/fwd/core.hpp
>
5
6
#include <
stan/math/prim/scal/fun/constants.hpp
>
7
8
namespace
stan
{
9
namespace
math
{
10
11
template
<
typename
T>
12
inline
fvar<T>
log
(
const
fvar<T>
&
x
) {
13
using
std::log
;
14
if
(x.
val_
< 0.0)
15
return
fvar<T>
(
NOT_A_NUMBER
,
NOT_A_NUMBER
);
16
else
17
return
fvar<T>
(
log
(x.
val_
), x.
d_
/ x.
val_
);
18
}
19
}
// namespace math
20
}
// namespace stan
21
#endif
core.hpp
stan::math::fvar::d_
T d_
Definition:
fvar.hpp:51
stan::math::NOT_A_NUMBER
const double NOT_A_NUMBER
Definition:
constants.hpp:53
stan
Definition:
StanTypedefs.h:9
stan::math::log
fvar< T > log(const fvar< T > &x)
Definition:
log.hpp:12
submit_syst.x
x
Definition:
submit_syst.py:249
stan::math::fvar::val_
T val_
Definition:
fvar.hpp:46
constants.hpp
stan::math::log
var log(const var &a)
Definition:
log.hpp:46
math
stan::math::fvar
Definition:
fvar.hpp:42
Generated on Sat Mar 6 2021 14:15:16 for NOvA by
1.8.11