Stan Math Library
2.14.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 <boost/math/tools/promotion.hpp>
5
6
namespace
stan
{
7
namespace
math {
8
22
template
<
typename
T1,
typename
T2,
typename
T3>
23
inline
typename
boost::math::tools::promote_args<T1, T2, T3>::type
24
fma
(
const
T1& x,
const
T2& y,
const
T3& z) {
25
return
x * y + z;
26
}
27
28
}
29
}
30
#endif
stan
Definition:
log_sum_exp.hpp:8
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:61
[
Stan Home Page
]
© 2011–2016, Stan Development Team.