#7191: Make Dirichlet characters work when base ring is CC
-----------------------------+----------------------------------------------
Reporter: bober | Owner: bober
Type: defect | Status: needs_work
Priority: major | Milestone: sage-4.8
Component: number theory | Keywords:
Work_issues: | Upstream: N/A
Reviewer: | Author:
Merged: | Dependencies:
-----------------------------+----------------------------------------------
Changes (by johanbosman):
* status: needs_review => needs_work
Comment:
The NotImplementedError message should also be adjusted in the gauss_sum()
function as you did in gauss_sum_numerical().
{{{
sage: G = DirichletGroup(500, base_ring=RR)
sage: G[1].gauss_sum()
---------------------------------------------------------------------------
NotImplementedError Traceback (most recent call
last)
...
NotImplementedError: Gauss sums only currently implemented when the base
ring is a cyclotomic field or QQ.
}}}
In the function is_odd:
{{{
if rings.is_ComplexField(self.base_ring()):
return abs(self(-1) - self.base_ring()(-1)) <
1.0/self.parent().zeta_order()
}}}
I do not understand why the rather mysterious expression
1.0/self.parent().zeta_order() is used. I'd say that the difference is
either 0 or 2, so if it's less than 1 in absolute value, this should
already be sufficient to test numerically that it is 0. Similarly for
is_even().
And now that I've put you back to work anyway, let's remove the C-style
brackets in the if-statement in line 1616. ;).
{{{
if(rings.is_ComplexField(C)):
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7191#comment:9>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.