I am curious as to why boost doesn't parse like c++ it should be (afaik):
((4*4)*(6/4))
but instead it seems to be doing
(((4*4)*6)/4)
I mean I guess I could simply put 6/4 on the left and problem solved but I am not understanding why the first version doesn't work. If anyone could explain I would appreciate.
const boost::multiprecision::cpp_int max = 6;
const boost::multiprecision::cpp_int factor = 4;
the type of the expressions factor * factor and max/factor is not an integer type.
The documentation states that it is an "an unmentionable expression template type".
Thanks JLBorges that explains, I was thinking it would only be cpp_dec_float and not cpp_int to have those results. Also how often do they have that many templates inside of each other? Looks like the coder would get confused.
raw_result_a is of type boost::multiprecision::detail::expression<boost::multiprecision::detail::multiply_immediates, boost::multiprecision::number<boost::multiprecision::backends::cpp_int_backend<0u, 0u, (boost::multiprecision::cpp_integer_type)1, (boost::multiprecision::cpp_int_check_type)0, std::allocator<unsigned long long> >, (boost::multiprecision::expression_template_option)1>, boost::multiprecision::number<boost::multiprecision::backends::cpp_int_backend<0u, 0u, (boost::multiprecision::cpp_integer_type)1, (boost::multiprecision::cpp_int_check_type)0, std::allocator<unsigned long long> >, (boost::multiprecision::expression_template_option)1>, void, void>
I see thanks and I reported it. Sorry I over read your "an unmentionable expression template type." I am surprised no one else had this problem unless not a lot of people use boost for project euler.
Oh I see why it didn't get put there the first time. I tried linking this thread for additional details (like I did last time) and it thinks it says "Captcha Error
Submission rejected as potential spam (External links in post found)
Trac thinks your submission might be Spam. To prove otherwise please provide a response to the following." Seems weird there is actually nothing following it. I will have to try and describe it as best I can.