id summary reporter owner description type status milestone component version severity resolution keywords cc 5498 Issues with the Interval Library dduffy@… Boris Gubenko "I am trying to compile some examples; in particular, the trigonometric, hyperbolic trig and transendental (exp, log!!)functions don't compile with default roudning policy (see file I included). It's a kind of show-stopper. Some user requests as well are: 1. Instead of bool when comparing interval, use TriBool (a result can be _indeterminate_) 2. Interval is missing midpoint() (same as median()). 3. Interval analysis is highly specialised; more user examples would be very welcome. I have the books by R.E. Moore but it takes some time to map his results to Interval. best regards Daniel // Code // TestInterval101.cpp // // Tests for Interval arithmetic. // // (C) Datasim Education BV 2009-2011 #include template std::ostream &operator<<(std::ostream &os, const boost::numeric::interval &x) { os << ""["" << x.lower() << "", "" << x.upper() << ""]""; return os; } typedef boost::numeric::interval Range; int main() { using namespace boost::numeric; // Create and manipulate some numbers. Range r1(0.0, 1,0); Range r2(-10.0, 20.0); Range r3(20.8, 44.9); double t = 2.0; r1 += t; r1 -= t; r1 *= t; r1 /= t; Range rTmp(2.0, 3.0); r1 += rTmp; r1 -= rTmp; r1 *= rTmp; r1 /= rTmp; // Numeric operations. Range r4 = r1 + r2; Range r5 = r1 - r2; Range r6 = r1 * r2; Range r7 = r1 / r2; // More numeric operations. t = 3.0; r4 = r1 + t; r5 = r1 - t; r6 = r1 * t; r7 = r1 / t; // Algebraic functions. r4 = abs(r1); r5 = sqrt(r2); r6 = square(r3); r7 = pow(r1, 2); // r1^2 Range r8 = nth_root(r1, 4); // NONE COMPILES // Transcendental functions // r4 = exp(r1); // boost::numeric::interval > myI; // myI = boost::numeric::exp(myI); //r5 = log(r2); // Trigonometric functions /* r4 = sin(r1); r5 = cos(r1); r6 = tan(r1); r7 = asin(r2); r7 = acos(r2); r7 = atan(r2); // Hyperbolic trigonometric functions r4 = sinh(r1); r5 = cosh(r1); r6 = tanh(r1); r7 = asinh(r2); r8 = acosh(r2); r6 = atanh(r2);*/ return 0; } " Bugs new Boost 1.46.0 interval Boost 1.46.0 Problem Interval