Dear all, I am defining a "scalar" type for a project, and this scalar I'd like to be an interval. Among the operations, already provided by boost interval, I need pow(interval, interval). Since there is no pow() function, but log() and exp() are defined, I mistakenly defined power as the obvious: typedef boost::numeric::interval<double> scalar; scalar p(1.0, 1.0), q(4, 100); log << "^ " << boost::numeric::exp(p * boost::numeric::log(q)) << std::endl; Unfortunately, it won't work, and it gives me this error: /usr/local/include/boost/numeric/interval/transc.hpp:47:42: No member named 'log_down' in 'boost::numeric::interval_lib::rounded_math<double>' /usr/local/include/boost/numeric/interval/transc.hpp:34:16: No member named 'exp_down' in 'boost::numeric::interval_lib::rounded_math<double>' Is there any "correct" pow() function I can implement? Is something wrong with the definition of scalar? Thank you!
On Wed, Jul 22, 2015 at 9:30 AM, Sensei
Dear all,
I am defining a "scalar" type for a project, and this scalar I'd like to be an interval. Among the operations, already provided by boost interval, I need pow(interval, interval).
That sounds more like a Range ? http://www.boost.org/doc/libs/1_58_0/libs/range/doc/html/index.html
Since there is no pow() function, but log() and exp() are defined, I mistakenly defined power as the obvious:
typedef boost::numeric::interval<double> scalar;
scalar p(1.0, 1.0), q(4, 100);
log << "^ " << boost::numeric::exp(p * boost::numeric::log(q)) << std::endl;
Unfortunately, it won't work, and it gives me this error:
/usr/local/include/boost/numeric/interval/transc.hpp:47:42: No member named 'log_down' in 'boost::numeric::interval_lib::rounded_math<double>'
/usr/local/include/boost/numeric/interval/transc.hpp:34:16: No member named 'exp_down' in 'boost::numeric::interval_lib::rounded_math<double>'
Is there any "correct" pow() function I can implement? Is something wrong with the definition of scalar?
Thank you!
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
On 7/22/15 3:34pm, Michael Powell wrote:
On Wed, Jul 22, 2015 at 9:30 AM, Sensei
wrote: Dear all,
I am defining a "scalar" type for a project, and this scalar I'd like to be an interval. Among the operations, already provided by boost interval, I need pow(interval, interval).
That sounds more like a Range ?
http://www.boost.org/doc/libs/1_58_0/libs/range/doc/html/index.html
I don't think so, I'd like to have something like a very basic subset of this(*): http://www.ti3.tu-harburg.de/rump/intlab/ As far as I see, boost interval is the C++ implementation of (some) interval algebra. Thanks for any pointers! (*) Scholarly article, if needed: http://www.ti3.tuhh.de/rump/intlab/ActaNumerica2010.pdf
Dear all, I've tried to move beyond simple exp/log functions, but this problem
/usr/local/include/boost/numeric/interval/transc.hpp:47:42: No member named 'log_down' in 'boost::numeric::interval_lib::rounded_math<double>'
/usr/local/include/boost/numeric/interval/transc.hpp:34:16: No member named 'exp_down' in 'boost::numeric::interval_lib::rounded_math<double>'
arises with *all* of the functions contained in transc.hpp, and I don't know what I'm doing wrong here. Can anyone help me? Thanks!
participants (2)
-
Michael Powell
-
Sensei