Boost logo

Boost :

Subject: Re: [boost] [math] potentian bug: iround throws, given double( numeric_limits<int>::min() )
From: Krzysztof Czainski (1czajnik_at_[hidden])
Date: 2011-10-20 17:32:50


2011/10/20 Krzysztof Czainski <1czajnik_at_[hidden]>

> Isn't that more or less the same as: http://www.boost.org/doc/libs/**
>> 1_47_0/libs/numeric/**conversion/doc/html/boost_**
>> numericconversion/improved_**numeric_cast__.html<http://www.boost.org/doc/libs/1_47_0/libs/numeric/conversion/doc/html/boost_numericconversion/improved_numeric_cast__.html>
>>
>> John.
>>
>
> I thought that was only for checking range. Or do you mean round(), and
> then numeric_cast<>() instead of checking range manually in round_cast<>()?
>
>
Ah, that can be customized with a policy, but the only rounding (not
Floor/Ceil/Trunc) policy provided is RoundEven which doesn't do exactly what
I want, while math::round does ;)

Besides, with math::round() I can use the same policy I use for other math
functions.

Regards,
Kris


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