unfortunately in that statement, the (e2/e1) power is applied to the
sum of inner terms, so I can't condense it any further than this:

(fabs(f1)**(2/e2) + fabs(f2)**(2/e2))**(e2/e1) + fabs(f3)**(2/e1)

On Wed, Sep 30, 2009 at 1:52 AM, Robert Bradshaw
<[email protected]> wrote:
> On Sep 29, 2009, at 12:03 PM, Chris Colbert wrote:
>
>> Actually, yes. The exponents are done specifically in that way to
>> force the sign of the end value.
>>
>> I suppose i could just call abs() on it though....
>
> I'm sure that abs would be faster than pow, though it's not the
> squaring that's expensive, but the arbitrary powers. (x^(1/e2))^(e2/
> e1) -> x^(1/e1) will always work for you since x is positive.
>
> - Robert
>
> _______________________________________________
> Cython-dev mailing list
> [email protected]
> http://codespeak.net/mailman/listinfo/cython-dev
>
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to