Boost logo

Boost :

Subject: Re: [boost] [math] potentian bug: iround throws, given double( numeric_limits<int>::min() )
From: John Maddock (boost.regex_at_[hidden])
Date: 2011-10-22 04:37:50


> Personally, I prefer names "round_cast/trunc_cast", as they better
> describe
> what's being done. I already use a function "round_to", that does
> something
> else:
>
> template < class T >
> T round_to( const T& x, const T& order )
> {
> return round( x / order ) * order; // By the way, can this
> be achieved more efficiently?
> }
>
> I'm not sure if "round_to" is the best name for this, but I think it is
> not
> the right name for "round_cast" ;-)

OK, can you file a feature request at svn.boost.org so I don't forget this?

Thanks, John.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk