Ticket #7917 (new enhancement)

Opened 3 years ago

Last modified 8 months ago

[with patch, needs review] make gauss_sum() work for dirichlet characters when the base ring is CC

Reported by: bober Owned by: was
Priority: major Milestone: sage-5.10
Component: number theory Keywords: dirichlet character gauss sum
Cc: rishi Work issues:
Report Upstream: N/A Reviewers:
Authors: bober Merged in:
Dependencies: Stopgaps:

Description

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

Attachments

gauss_sum_CC.patch Download (3.2 KB) - added by bober 3 years ago.

Change History

Changed 3 years ago by bober

comment:1 Changed 3 years ago by rishi

  • Cc rishi added

comment:2 Changed 8 months ago by roed

Should this be marked as needs review?

Note: See TracTickets for help on using tickets.