
--- Cromwell Enage wrote:
What I'll do is: 1) Create an internal metafunction in the double_::aux namespace that does what fractional_part does now. 2) Change fractional_part so that it returns a double. 3) Implement numerator and denominator specializations that use the metafunction in 1).
Then, with fractional_power as a template nested within power_impl, we can return:
times< integral_power<z,integral_part<a> > , fractional_power<z, fractional_part<a> > >
Done. --- Peder Holt wrote:
The series: z^a == Sum[(Log[z]^k/k!) a^k, {k, 0, Infinity}] requires 27 recursions, but the code is very simple:
The series looks exactly like e^(a log z), which is what we have right now. I tried to make BOOST_MPL_MATH_DOUBLE work for GCC in strict mode over the weekend. In particular, I tried to take advantage of the feature that allows double to be implicitly cast to long long in an integral constant expression. (For those of you who are just joining us, GCC is currently treating int(...) and static_cast<...>(...) as runtime functions. Not even BOOST_MPL_AUX_STATIC_CAST is working for me.) However, GCC 3.4 and above no longer support double& as a non-type template parameter, and integral_c<long long, double_value> also fails. So, I'm at a loss here. If any GCC experts out there notice anything that I've missed--other than relaxed mode--please let me know. The syntax for BOOST_MPL_MATH_DOUBLE is much more elegant than string_c_to_double, and we'd like for everyone to be able to use it. Cromwell D. Enage __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com