Subject: couple of questions about complex expressions
From: Robert Dodier
Date: Wed, 26 Sep 2012 14:17:22 -0600
On Tue, Sep 25, 2012 at 4:38 AM, Barton Willis <willisb at unk.edu> wrote:
> It's a mess. I think domain : complex and m1pbranch : true is supposed to
> give the principle branch,
> and domain : real and m1pbranch : false the real branch, I think.
I wonder if the default values for domain and m1pbranch ought
to be complex and true, respectively. That would be more generally
correct, right? (for some value of "correct")
> But sometimes numer matters
> (%i9) block([domain : real, m1pbranch : false, numer : true], (-8)^(1/3));
> (%o9) 2.0*(-1)^0.33333333333333
I think converting exponents to floats under the influence of
numer is unfortunate. Presumably the idea of numer is to cause
an expression to evaluate to a number. Sometimes it is sufficient
to simply replace any constant value by a float, and then the
simplification machinery does the rest. But that's not a general
strategy, right? There is at least one case of widespread interest
for which that's not the best strategy, namely, fractional exponents.
I don't have an alternative for the current implementation of numer,
but it seems to be worth the trouble to think it through.
best,
Robert Dodier