Lyapunov exponents (comparison)¶
Lyapunov parallel computation for MCF algorithms
-
slabbe.lyapunov.
lyapunov_comparison_table
(L, n_orbits=100, n_iterations=10000)¶ Return a table of values of Lyapunov exponents for many algorithm.
INPUT:
L
– list of algorithmsn_orbits
– integern_iterations
– integer
OUTPUT:
tableEXAMPLES:
sage: import slabbe.mult_cont_frac as mcf sage: from slabbe.lyapunov import lyapunov_comparison_table sage: algos = [mcf.Brun(), mcf.ARP()] sage: lyapunov_comparison_table(algos) # abs tol 0.01 Algorithm \#Orbits $\theta_1$ (std) $\theta_2$ (std) $1-\theta_2/\theta_1$ (std) +-------------------------+----------+------------------+------------------+-----------------------------+ Arnoux-Rauzy-Poincar\'e 100 0.44 (0.012) -0.172 (0.0060) 1.388 (0.0054) Brun 100 0.30 (0.011) -0.113 (0.0049) 1.370 (0.0070)
-
slabbe.lyapunov.
lyapunov_sample
(algo, n_orbits, n_iterations=1000, verbose=False)¶ Return lists of values for theta1, theta2 and 1-theta2/theta1 computed on many orbits.
This is computed in parallel.
INPUT:
n_orbits
– integer, number of orbitsn_iterations
– integer, length of each orbitverbose
– bool (default:False
)
OUTPUT:
tuple of three listsEXAMPLES:
sage: from slabbe.lyapunov import lyapunov_sample sage: from slabbe.mult_cont_frac import Brun sage: lyapunov_sample(Brun(), 5, 1000000) # abs tol 0.01 [(0.3027620661266397, 0.3033468535021702, 0.3044950176856005, 0.3030531162480779, 0.30601169862996064), (-0.11116236859835525, -0.11165563059874498, -0.1122595926203868, -0.11190323336181864, -0.11255687513610782), (1.367160820443926, 1.3680790794750939, 1.3686746452327765, 1.3692528714016428, 1.3678188632657973)]
-
slabbe.lyapunov.
lyapunov_table
(algo, n_orbits, n_iterations=1000)¶ Return a table of values of Lyapunov exponents for this algorithm.
INPUT:
n_orbits
– integer, number of orbitsn_iterations
– integer, length of each orbit
OUTPUT:
table of liapounov exponentsEXAMPLES:
sage: from slabbe.mult_cont_frac import Brun sage: from slabbe.lyapunov import lyapunov_table sage: lyapunov_table(Brun(), 10, 1000000) # random 10 succesful orbits min mean max std +-----------------------+---------+---------+---------+---------+ $\theta_1$ 0.303 0.305 0.307 0.0013 $\theta_2$ -0.1131 -0.1124 -0.1115 0.00051 $1-\theta_2/\theta_1$ 1.3678 1.3687 1.3691 0.00043