Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trac #20756: sign is slow (if not wrong) for number field elements
{{{ sage: x = polygen(ZZ) sage: K.<a> = NumberField(x^100 - 3, embedding=AA(3)**(1/100)) sage: %time sign(a) CPU times: user 1.34 s, sys: 0 ns, total: 1.34 s Wall time: 1.33 s 1 sage: b = continued_fraction(a).convergent(20) - a sage: sign(b) sgn(-1/1495877943276*(1/4)^(1/5)*(-(sqrt(5) - I*sqrt(-2*sqrt(5) + 10) + 1)*(-3^(1/4))^(1/5))^(1/5)*(373969485819*sqrt(5) - 373969485819*I*sqrt(-2*sqrt(5) + 10) + 373969485819) + 378100611523/373969485819) }}} With the branch applied {{{ sage: %time sign(a) CPU times: user 4 ms, sys: 0 ns, total: 4 ms Wall time: 4.65 ms 1 sage: b = continued_fraction(a).convergent(20) - a sage: %time sign(b) CPU times: user 4 ms, sys: 0 ns, total: 4 ms Wall time: 6.02 ms -1 }}} URL: http://trac.sagemath.org/20756 Reported by: vdelecroix Ticket author(s): Vincent Delecroix Reviewer(s): Marc Mezzarobba
- Loading branch information