Hi, I've been attempting to use the interval library on a MIPS/IRIX machine without luck. The problem is that there is no native rounding support and we don't have a C99 environment. I'm getting "Please specify rounding control mechanism" errors from the preprocessor. The thing is, I don't need a rounding mode. I simply want to use intervals of type int. I could understand the error if I was trying to use floating-point intervals but shouldn't I be able to specify intervals that don't require rounding? Or even specify intervals with a policy that ignores rounding? Has anyone run into this problem before? Is there a workaround? -Dave
En réponse à "David A. Greene" <greened@obbligato.org>:
Hi,
I've been attempting to use the interval library on a MIPS/IRIX machine without luck. The problem is that there is no native rounding support and we don't have a C99 environment. I'm getting "Please specify rounding control mechanism" errors from the preprocessor.
The thing is, I don't need a rounding mode. I simply want to use intervals of type int. I could understand the error if I was trying to use floating-point intervals but shouldn't I be able to specify intervals that don't require rounding? Or even specify intervals with a policy that ignores rounding?
Has anyone run into this problem before? Is there a workaround?
-Dave
The header "numeric/interval.hpp" is meant to include almost all the other public headers of the library, and in particular the ones responsible for floating-point support. To avoid this problem, just use the other headers (all the headers are public except the ones in the "detail" subdirectory). For example, instead of using: #include <boost/numeric/interval.hpp> you should use: #include <boost/numeric/interval/interval.hpp> #include <boost/numeric/interval/utility.hpp> #include <boost/numeric/interval/arith.hpp> ... To know which headers you may need, you should refer to the documentation: libs/numeric/interval/doc/includes.htm Regards, Guillaume PS: I don't know what you intend to do with the library, but please keep in mind that just using the type boost::numeric::interval<int> does not provide any guarantee of the inclusion property.
participants (2)
-
David A. Greene
-
Guillaume Melquiond