本文整理汇总了Python中sage.rings.all.ComplexField._real_field方法的典型用法代码示例。如果您正苦于以下问题:Python ComplexField._real_field方法的具体用法?Python ComplexField._real_field怎么用?Python ComplexField._real_field使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sage.rings.all.ComplexField
的用法示例。
在下文中一共展示了ComplexField._real_field方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Dokchitser
# 需要导入模块: from sage.rings.all import ComplexField [as 别名]
# 或者: from sage.rings.all.ComplexField import _real_field [as 别名]
#.........这里部分代码省略.........
sage: L.set_coeff_growth('2*n^(11/2)')
sage: L.num_coeffs()
11
Now we're ready to evaluate, etc.
::
sage: L(1)
0.0374412812685155
sage: L(1, 1.1)
0.0374412812685155
sage: L.taylor_series(1,3)
0.0374412812685155 + 0.0709221123619322*z + 0.0380744761270520*z^2 + O(z^3)
"""
def __init__(self, conductor, gammaV, weight, eps, \
poles=[], residues='automatic', prec=53,
init=None):
"""
Initialization of Dokchitser calculator EXAMPLES::
sage: L = Dokchitser(conductor=1, gammaV=[0], weight=1, eps=1, poles=[1], residues=[-1], init='1')
sage: L.num_coeffs()
4
"""
self.conductor = conductor
self.gammaV = gammaV
self.weight = weight
self.eps = eps
self.poles = poles
self.residues = residues
self.prec = prec
self.__CC = ComplexField(self.prec)
self.__RR = self.__CC._real_field()
if not init is None:
self.init_coeffs(init)
self.__init = init
else:
self.__init = False
def __reduce__(self):
D = copy.copy(self.__dict__)
if '_Dokchitser__gp' in D:
del D['_Dokchitser__gp']
return reduce_load_dokchitser, (D, )
def _repr_(self):
z = "Dokchitser L-series of conductor %s and weight %s"%(
self.conductor, self.weight)
return z
def __del__(self):
self.gp().quit()
def gp(self):
"""
Return the gp interpreter that is used to implement this Dokchitser
L-function.
EXAMPLES::
sage: E = EllipticCurve('11a')
sage: L = E.lseries().dokchitser()
sage: L(2)
0.546048036215014
sage: L.gp()