Boost Users :
Subject: Re: [Boost-users] Boost.Math pow and __int64
From: gast128 (gast128_at_[hidden])
Date: 2010-09-28 14:08:47
John Maddock <boost.regex <at> virgin.net> writes:
> > Not sure if this zero warning policy is in effect, but if so maybe Boost
> > can
> > have a look at use of __int64 and pow (e.g. boost::math::pow<2, __int64>
> > gives
> > a warning)?
> Fixed in Trunk: please note that pow<2, __int64> returns double, the "fixed"
> version performs calculations at double precision internally as well. These
> aren't intended as *integer* routines if that's what you're looking for...
> HTH, John.
Thx. We had that discussion here, that returning an integer would be more
precise / faster, until somebody noticed that (32 bit) integers overflow very
fast. So it is ok that integers are 'promoted' to double.
Btw nice addition this function. I think it's twice as fast as using std::pow
using VStudio 2008.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net