CoCalc Public Fileswww / cgi-bin / mfd / mfe_lratio_odd.pyOpen with one click!
Author: William A. Stein
Compute Environment: Ubuntu 18.04 (Deprecated)
1
#!/usr/bin/python
2
3
import cgi, mfd, sys, constants
4
5
form = cgi.FieldStorage()
6
7
print "Content-Type: text/html"
8
print ""
9
10
if form.has_key("code"):
11
code = form["code"].value
12
else:
13
print "Missing code"
14
sys.exit(0)
15
16
if form.has_key("j"):
17
j = form["j"].value
18
if j != "all":
19
j = int(j)
20
else:
21
print "Missing j"
22
sys.exit(0)
23
24
M = mfd.ModSym(code)
25
lratio_odd = M.lratio_odd()
26
if lratio_odd == constants.not_computed or (j != "all" and (j < 1 or j > len(lratio_odd))):
27
ans = 'lratio_odd[%s] := "unknown";'
28
else:
29
if j == "all":
30
ans = "lratio_odd := %s;\n"%lratio_odd
31
ans = ans.replace("'","")
32
else:
33
ans = "lratio_odd[%s] := %s;\n"%(j,lratio_odd[j-1])
34
35
print "// Odd parts of L(%s,%s)/Omega_%s<br><br>"%(code,j,j)
36
print ans
37
38