Ticket #7917 (new enhancement)
[with patch, needs review] make gauss_sum() work for dirichlet characters when the base ring is CC
|Reported by:||bober||Owned by:||was|
|Component:||number theory||Keywords:||dirichlet character gauss sum|
This is a pretty small change. We add three lines to gauss_sum_numerical() to make it work when the base ring is a complex field, and change gauss_sum() to call gauss_sum_numerical() when the base ring is a complex field.
Note that it is actually much faster to compute the (approximate) gauss sum when the base ring is CC, as compared to when the base ring is a cyclotomic field.
sage: G = DirichletGroup(2981) sage: chi = G.0 sage: timeit('chi.gauss_sum_numerical()') 5 loops, best of 3: 1.82 s per loop sage: G = DirichletGroup(2981, ComplexField(200)) sage: chi = G.0 sage: timeit('chi.gauss_sum_numerical()') 25 loops, best of 3: 23.5 ms per loop