Automatic Differentiation
 
Loading...
Searching...
No Matches
copysign.hpp File Reference
#include <stan/math/prim/meta.hpp>
#include <stan/math/prim/fun/value_of_rec.hpp>
#include <cmath>
#include <complex>

Go to the source code of this file.

Namespaces

namespace  stan
 The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation from C or the boost::math::lgamma implementation.
 
namespace  stan::math
 Matrices and templated mathematical functions.
 

Functions

template<typename T , typename U >
stan::math::copysign (const T &x, const U &y)
 Return the negation of the first argument if the first and second argument have different signs, otherwise return a copy of the first argument.
 
template<typename T , typename U >
stan::math::copysign_non_zero (const T &x, const U &y)
 Return the negation of the first argument if the first and second arguments have different signs and the first argument is not zero, otherwise return a copy of the first argument.
 
template<typename T , typename U >
std::complex< T > stan::math::copysign (const std::complex< T > &x, const std::complex< U > &y)
 Return the complex number composed of the real and complex parts with signs copied from the real and complex parts of the first arguments to the real and complex parts of the second.