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')
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')
def format_coeffs(coeffs): return pol_to_html(str(coeff_to_poly(string2list(coeffs))))
def web_poly(self): return pol_to_html(str(coeff_to_poly(self.coeffs())))
def format_coeffs(coeffs): return pol_to_html(str(coeff_to_poly(coeffs)))
def web_poly(self): return pol_to_html(str(coeff_to_poly(self.coeffs())))
def polredabshtml(self): return pol_to_html(self.polredabs())
def polredabshtml(self): return pol_to_html(self.polredabs())