Commit 7a040ed4 authored by Martin Reinecke's avatar Martin Reinecke

warning patrol

parent 19ee9901
......@@ -123,7 +123,7 @@ template<typename T> Healpix_Map<T> Healpix_Map<T>::median (double rad) const
if (!approx(map[i], T(Healpix_undef)))
list[cnt++] = map[i];
out[m] = (cnt>0) ? mymedian(list.begin(),list.begin()+cnt)
: Healpix_undef;
: T(Healpix_undef);
}
return out;
}
......
......@@ -78,10 +78,6 @@ static inline void vhsum_cmplx_special (Tv a, Tv b, Tv c, Tv d,
cc[1] += complex<double>(reduce(c,std::plus<>()),reduce(d,std::plus<>()));
}
#endif
// In the following, we explicitly allow the compiler to contract floating
// point operations, like multiply-and-add.
// Unfortunately, most compilers don't act on this pragma yet.
#pragma STDC FP_CONTRACT ON
using dcmplx = complex<double>;
......
......@@ -39,11 +39,11 @@
namespace mr {
/*! Returns \e true if | \a a-b | <= \a epsilon * | \a b |, else \e false. */
template<typename F> inline bool approx (F a, F b, F epsilon=1e-5)
template<typename F> inline bool approx (F a, F b, F epsilon=F(1e-5L))
{ return std::abs(a-b) <= (epsilon*std::abs(b)); }
/*! Returns \e true if | \a a-b | <= \a epsilon, else \e false. */
template<typename F> inline bool abs_approx (F a, F b, F epsilon=1e-5)
template<typename F> inline bool abs_approx (F a, F b, F epsilon=F(1e-5L))
{ return std::abs(a-b) <= epsilon; }
/*! Returns the largest integer which is smaller than (or equal to) \a arg. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment