Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
""" p-adic Flat Polynomials """
#***************************************************************************** # Distributed under the terms of the GNU General Public License (GPL) # as published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # http://www.gnu.org/licenses/ #*****************************************************************************
""" TESTS:
Check that :trac:`13620` has been fixed::
sage: K = ZpFM(3) sage: R.<t> = K[] sage: R(R.zero()) 0
""" Polynomial_generic_dense.__init__(self, parent, x, check, is_gen, construct) return if x.denominator() != 1: raise TypeError("denominator must be 1") else: x = x.numerator() x = list(x.list()) else: if check: m = infinity zero = R(0) n = max(x.keys()) if x else 0 v = [zero] * (n + 1) for i, z in six.iteritems(x): v[i] = R(z) m = min(m, v[i].precision_absolute()) x = v else: m = sage.rings.padics.misc.min(a.precision_absolute() for a in x.values()) if not absprec is None: m = min(m, absprec) Polynomial_generic_dense.__init__(self, parent, x, absprec = m) return else: |