Hans Peter Würmli [wurmli@freesurf.ch] wrote:
Why don't you define a simple function like:
numeric qrt(numeric n){ if (n>=0) return pow(n,numeric(1)/numeric(3)); else return -pow(-n,numeric(1)/numeric(3)); }
and use that in your particular problem.
Because it's the symbolic expression I'm interested in, and I can't test if n >= 0. I suppose I could make a: class nthroot : public function { public: nthroot(numeric n, ex arg); // ... and override the evalf function for it (I'm not sure how to do this). But I was hoping this could be incorporated into pow() since the problem crops up for any pow() with a fractional exponent. Cheers, -- Bob Bob McElrath (rsmcelrath@students.wisc.edu) Univ. of Wisconsin at Madison, Department of Physics