10 #ifndef _TEUCHOS_BLAS_UQ_PCE_HPP_
11 #define _TEUCHOS_BLAS_UQ_PCE_HPP_
22 template<
typename Storage>
60 if (STS::magnitude (*da) > STS::magnitude (*db)) {
63 scale = STS::magnitude (*da) + STS::magnitude (*db);
64 if (scale == STS::zero()) {
75 r = scale * STS::squareroot (da_scaled*da_scaled + db_scaled*db_scaled);
76 r = SIGN (STS::one(), roe) * r;
80 if (STS::magnitude (*da) > STS::magnitude (*db)) {
83 if (STS::magnitude (*db) >= STS::magnitude (*da) && *c != STS::zero()) {
100 const ordinal_type sz = x.size() > y.size() ? x.size() : y.size();
102 for (ordinal_type i=0; i<sz; ++i)
103 z.fastAccessCoeff(i) = value_rotator.SIGN(x.coeff(i), y.coeff(i));
112 #endif // _TEUCHOS_BLAS_UQ_PCE_HPP_
void ROTG(ScalarType *da, ScalarType *db, ScalarType *c, ScalarType *s) const
Sacado::UQ::PCE< Storage > ScalarType
ScalarType SIGN(ScalarType x, ScalarType y) const
Return ABS(x) if y > 0 or y is +0, else -ABS(x) (if y is -0 or < 0).