コード例 #1
0
 def test_pol_to_html(self):
     r"""
     Checking utility: pol_to_html
     """
     x = var('x')
     f1 = x**2 + 2 * x + 1
     self.assertEqual(pol_to_html(f1),
                      '<i>x</i><sup>2</sup> + 2<i>x</i> + 1')
     f2 = 'x^3 + 1'
     self.assertEqual(pol_to_html(f2), '<i>x</i><sup>3</sup> + 1')
コード例 #2
0
ファイル: test_utils.py プロジェクト: edgarcosta/lmfdb
 def test_pol_to_html(self):
     r"""
     Checking utility: pol_to_html
     """
     x = var('x')
     f1 = x**2 + 2*x + 1
     self.assertEqual(pol_to_html(f1),
                      '<i>x</i><sup>2</sup> + 2<i>x</i> + 1')
     f2 = 'x^3 + 1'
     self.assertEqual(pol_to_html(f2),
                      '<i>x</i><sup>3</sup> + 1')
コード例 #3
0
ファイル: main.py プロジェクト: rupertm2/lmfdb
def format_coeffs(coeffs):
    return pol_to_html(str(coeff_to_poly(string2list(coeffs))))
コード例 #4
0
ファイル: web_number_field.py プロジェクト: pascalmolin/lmfdb
 def web_poly(self):
     return pol_to_html(str(coeff_to_poly(self.coeffs())))
コード例 #5
0
ファイル: number_field.py プロジェクト: jwj61/lmfdb
def format_coeffs(coeffs):
    return pol_to_html(str(coeff_to_poly(coeffs)))
コード例 #6
0
ファイル: WebNumberField.py プロジェクト: koffie/lmfdb
 def web_poly(self):
     return pol_to_html(str(coeff_to_poly(self.coeffs())))
コード例 #7
0
ファイル: math_classes.py プロジェクト: tomgrubbmath/lmfdb
 def polredabshtml(self):
     return pol_to_html(self.polredabs())
コード例 #8
0
ファイル: math_classes.py プロジェクト: JRSijsling/lmfdb
 def polredabshtml(self):
     return pol_to_html(self.polredabs())