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
"Polynomial multiplication by Kronecker substitution"
################################################################################ # Copyright (C) 2007 William Stein <wstein@gmail.com> # # Distributed under the terms of the GNU General Public License (GPL) # # http://www.gnu.org/licenses/ ################################################################################
from sage.rings.rational_field import QQ from sage.rings.integer_ring import ZZ
# Faster than SAGE's from math import log as pylog from math import ceil as pyceil
def _mul_fateman_to_int2(f_list,g_list): """ Convert a polynomial to an integer by evaluating it INPUT: p, a list of integers OUTPUT: padding """
def _mul_fateman_to_poly(number,padding): """ Converts a number to a polynomial, according to a padding OUTPUT: a list containing the coefficient of a polynomial of degree len(list)
""" number = -number flag=1
return [-c for c in coeffs]
def _mul_fateman_mul(f,g): """ Multiply 2 polynomials """
# If these polynomials have real # coefficients, convert them to # rational coefficients. # Note: no precision is lost in this # direction
# Need to change ring to ZZ
#return to_poly(n_f*n_g,padding) else:
|