Subject: Re: [Boost-bugs] [Boost C++ Libraries] #1632: Default Interval rounding policies incomplete
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-05-24 16:15:02
#1632: Default Interval rounding policies incomplete
----------------------------------------------+-----------------------------
Reporter: Steven Robbins <smr_at_[hidden]> | Owner: no-maintainer
Type: Bugs | Status: new
Milestone: Boost 1.36.0 | Component: numeric
Version: Boost 1.34.1 | Severity: Problem
Resolution: | Keywords:
----------------------------------------------+-----------------------------
Comment (by Ben Galehouse <bgalehouse_at_[hidden]>):
According to the documentation at
http://www.boost.org/doc/libs/1_35_0/libs/numeric/interval/doc/rounding.htm
in the "transcendental function" section, the standard library routines
for tan, etc, do not typically satisfy the needed rounding properties and
therefore the templates which implement them are disabled by default.
I have used tan with the interval library. If you pass it a policy based
on rounded_transc_std, it works fine.
e.g. I have written a rounded_control specialization for the mpfr_class
type from the gmpfrxx interface to mpfr.
(http://math.berkeley.edu/~wilken/code/gmpfrxx/) With it I can declare the
specialization
{{{
template<>
struct rounded_math<mpfr_class>
: save_state_nothing<rounded_transc_std<mpfr_class> >
{};
}}}
and then code like
{{{
j = boost::numeric::interval<mpfr_class> (0.1,0.2);
j = boost::numeric::tan(j);
std::cout << "[" << j.lower() << "," << j.upper() << "]" << "\n";
}}}
compiles, executes, and gives plausible looking results. Therefore, I
think this is working as designed.
--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1632#comment:3>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:57 UTC