sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.34k stars 460 forks source link

Slow trivial elliptic functions evaluation #25101

Open rwst opened 6 years ago

rwst commented 6 years ago

Evaluation of e.g. elliptic_f(asin((-b<sup>(1/3)*(c+d*x)</sup>(1/3)+(b*c-a*d)<sup>(1/3)*(1+sqrt(3)))/(-b</sup>(1/3)*(c+d*x)<sup>(1/3)+(b*c-a*d)</sup>(1/3)*(1-sqrt(3)))),-7+4*sqrt(3)) by Sage takes surprising 9 sec on a fast system, although no computation should be involved (in==out). Reason is the elliptic eval function tries to prove that asin... is nonzero. For the general problem and solution see https://trac.sagemath.org/wiki/symbolics/nonzero

Component: performance

Author: Ralf Stephan

Branch/Commit: u/rws/slow_trivial_elliptic_f_evaluation @ c0df369

Issue created by migration from https://trac.sagemath.org/ticket/25101

rwst commented 6 years ago

Branch: u/rws/slow_trivial_elliptic_f_evaluation

rwst commented 6 years ago

Description changed:

--- 
+++ 
@@ -1 +1 @@
-Evaluation of `elliptic_f(asin((-b<sup>(1/3)*(c+d*x)</sup>(1/3)+(b*c-a*d)<sup>(1/3)*(1+sqrt(3)))/(-b</sup>(1/3)*(c+d*x)<sup>(1/3)+(b*c-a*d)</sup>(1/3)*(1-sqrt(3)))),-7+4*sqrt(3))` by Sage takes surprising 9 sec on a fast system, although no computation should be involved (in==out). Reason is the elliptic eval function tries to prove that `asin...` is nonzero. For the general problem and solution see https://trac.sagemath.org/wiki/symbolics/nonzero
+Evaluation of e.g. `elliptic_f(asin((-b<sup>(1/3)*(c+d*x)</sup>(1/3)+(b*c-a*d)<sup>(1/3)*(1+sqrt(3)))/(-b</sup>(1/3)*(c+d*x)<sup>(1/3)+(b*c-a*d)</sup>(1/3)*(1-sqrt(3)))),-7+4*sqrt(3))` by Sage takes surprising 9 sec on a fast system, although no computation should be involved (in==out). Reason is the elliptic eval function tries to prove that `asin...` is nonzero. For the general problem and solution see https://trac.sagemath.org/wiki/symbolics/nonzero
rwst commented 6 years ago

Author: Ralf Stephan

rwst commented 6 years ago

Commit: f96bbd4

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 6 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

c0df36925101: bypass Expression.__nonzero__
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 6 years ago

Changed commit from f96bbd4 to c0df369

videlec commented 6 years ago
comment:4

update milestone 8.3 -> 8.4

fchapoton commented 4 years ago
comment:5

red branch => needs_work

mkoeppe commented 3 years ago
comment:7

Setting new milestone based on a cursory review of ticket status, priority, and last modification date.

mkoeppe commented 3 years ago
comment:8

Setting a new milestone for this ticket based on a cursory review.