Stan Math Library
2.20.0
reverse mode automatic differentiation
stan
math
prim
scal
fun
fma.hpp
Go to the documentation of this file.
1
#ifndef STAN_MATH_PRIM_SCAL_FUN_FMA_HPP
2
#define STAN_MATH_PRIM_SCAL_FUN_FMA_HPP
3
4
#include <
stan/math/prim/meta.hpp
>
5
#include <boost/math/tools/promotion.hpp>
6
7
namespace
stan
{
8
namespace
math {
9
23
template
<
typename
T1,
typename
T2,
typename
T3>
24
inline
typename
boost::math::tools::promote_args<T1, T2, T3>::type
fma
(
25
const
T1& x,
const
T2& y,
const
T3& z) {
26
return
x * y + z;
27
}
28
29
}
// namespace math
30
}
// namespace stan
31
#endif
stan
Definition:
log_sum_exp.hpp:8
meta.hpp
stan::math::fma
fvar< typename stan::return_type< T1, T2, T3 >::type > fma(const fvar< T1 > &x1, const fvar< T2 > &x2, const fvar< T3 > &x3)
The fused multiply-add operation (C99).
Definition:
fma.hpp:59
[
Stan Home Page
]
© 2011–2018, Stan Development Team.