The function template <class V> void assign_large_int(V a) inside boost::math::ntl::RR contains the lines t = static_cast<double>(a & 0xffff); m_value += ldexp(RR(t), exp).value(); My compiler (powerpc-apple-darwin8-g++-4.0.1) complains about the second line: error: cannot convert 'boost::math::ntl::RR' to 'double' for argument '1' to 'double ldexp(double, int)' I assume this is because it cannot see the function definition for RR ldexp(RR r, int exp) defined further down in RR.hpp. This trivial patch fixes the error for me: math_toolkit/boost/math/bindings$ svn diff rr.hpp Index: rr.hpp =================================================================== --- rr.hpp (revision 39435) +++ rr.hpp (working copy) @@ -25,6 +25,9 @@ namespace ntl { +class RR; +RR ldexp(RR r, int exp); + class RR { public: math_toolkit/boost/math/bindings$ but there may (probably?) be similar errors for the other functions. Cheers, Jordan
Jordan Kyriakidis wrote:
I assume this is because it cannot see the function definition for
RR ldexp(RR r, int exp)
defined further down in RR.hpp. This trivial patch fixes the error for me:
<snip> Thanks.
but there may (probably?) be similar errors for the other functions.
Sigh: yes probably, I need to write some concept checkering-code for that I guess. Will fix, Thanks for the report, John.
Jordan Kyriakidis wrote:
My compiler (powerpc-apple-darwin8-g++-4.0.1) complains about the second line:
I forgot to mention: I've had problems porting to powerpc MacOS X: it's their weird long double that messes things up. If you're going to using the toolkit on that platform I'd *strongly recomend* that you run the regression tests and see what breaks: last time it was checked there were some quite gross errors in the Bessel functions if I remember correctly. It's probably a trivial fix that's needed somewhere, but I don't have access to that platform... so any help you can offer is much appreciated! John.
John Maddock
I've had problems porting to powerpc MacOS X: it's their weird long double that messes things up. If you're going to using the toolkit on that platform I'd *strongly recomend* that you run the regression tests and see what breaks:
I'm willing to do that and let you know what I find. But how do I run the regression tests?
Jordan Kyriakidis wrote:
John Maddock
writes: I've had problems porting to powerpc MacOS X: it's their weird long double that messes things up. If you're going to using the toolkit on that platform I'd *strongly recomend* that you run the regression tests and see what breaks:
I'm willing to do that and let you know what I find. But how do I run the regression tests?
It sounds like you have a copy of the Sandbox SVN already, so cd into sandbox/math_toolkit/libs/math/test then set the environment variable BOOST to point to the root directory of Boost-1.34 (depending how much of the sandbox you checked out, you may need to set BOOST_ROOT as well or instead). Then: bjam mytoolset 2>&1 | tee toolkit.log where "mytoolkit" is the name of the bjam toolset for that compiler/platform. Not sure if you need to use "darwin" or "gcc" on that platform these days: try "darwin" first and then fall back to gcc if that doesn't work anymore. Then step back for a long wait :-) The test log will likely be quite large, so I suggest we take this off-list rather than clog up everyones inboxes with it ;-) Many thanks, John Maddock.
participants (2)
-
John Maddock
-
Jordan Kyriakidis