|
Boost : |
Subject: Re: [boost] [multiprecision] Are these types suitable as numeric types for unit tests?
From: Daryle Walker (darylew_at_[hidden])
Date: 2013-06-09 13:15:12
-----Original Message-----
From: John Maddock
Sent: Saturday, June 08, 2013 4:40 AM
>> I'm getting warnings about integer overflow. The problem is at Line
>> 59 of boost/test/tools/detail/print_helper.hpp. It sets an output
>> stream's precision based on the digits given by std::numeric_limits.
>
>That's harmless but annoying: it's because
std::numeric_limits<cpp_int>::digits is
>INT_MAX. The stream precision isn't ever used by integer types anyway...
I switched to one of the fixed-sized types (512 bits).
>> This time it's an error, at Line 59 of
>> boost/test/tools/floating_point_comparison.hpp. There no (close
>> enough) matching function for "fpt_abs" from some
>> "boost::multiprecision::detail::expression<..." type. (It was
>> truncated by the display. I don't know how to get a clean print-out
>> of errors from
>> Code::Blocks.) I'm guessing the expression template setup is screwing
>> things up.
>
>Yes, it's because Boost.Test can't be used with expression template enabled
types.
>It's a known issue, and I've added a patch for this:
>https://svn.boost.org/trac/boost/ticket/8272, but Genediiy seems to be MIA
at present :-(
>
>Do you particularly want to test with expression-template enabled types (I
reaslise
>there are cases when you do)? If not then you could use multiprecision
types that
>have expression templates turned off and that should fix things.
I switched to the same type with expression-templates turned off.
Daryle W.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk