docstr: This class denotes the seive polynomial.
  If ``g(x) = (a*x + b)**2 - N``. `g(x)` can be expanded
  to ``a*x**2 + 2*a*b*x + b**2 - N``, so the coefficient
  is stored in the form `[a**2, 2*a*b, b**2 - N]`. This
  ensures faster `eval` method because we dont have to
  perform `a**2, 2*a*b, b**2` every time we call the
  `eval` method. As multiplication is more expensive
  than addition, by using modified_coefficient we get
  a faster seiving process.
  
  Parameters
  ==========
  
  modified_coeff : modified_coefficient of sieve polynomial
  a : parameter of the sieve polynomial
  b : parameter of the sieve polynomial
docstr_tok: ["This","class","denotes","the","seive","polynomial",".","If","``","g","(","x",")","=","(","a","*","x","+","b",")","*","*","2","-","N","``",".","`","g","(","x",")","`","can","be","expanded","to","``","a","*","x","*","*","2","+","2","*","a","*","b","*","x","+","b","*","*","2","-","N","``",",","so","the","coefficient","is","stored","in","the","form","`","[","a","*","*","2",",","2","*","a","*","b",",","b","*","*","2","-","N","]","`",".","This","ensures","faster","`","eval","`","method","because","we","dont","have","to","perform","`","a","*","*","2",",","2","*","a","*","b",",","b","*","*","2","`","every","time","we","call","the","`","eval","`","method",".","As","multiplication","is","more","expensive","than","addition",",","by","using","modified_coefficient","we","get","a","faster","seiving","process",".","Parameters","==========","modified_coeff",":","modified_coefficient","of","sieve","polynomial","a",":","parameter","of","the","sieve","polynomial","b",":","parameter","of","the","sieve","polynomial"]
code: def __init__(self, modified_coeff=(), a=None, b=None):
      """This class denotes the seive polynomial.
      If ``g(x) = (a*x + b)**2 - N``. `g(x)` can be expanded
      to ``a*x**2 + 2*a*b*x + b**2 - N``, so the coefficient
      is stored in the form `[a**2, 2*a*b, b**2 - N]`. This
      ensures faster `eval` method because we dont have to
      perform `a**2, 2*a*b, b**2` every time we call the
      `eval` method. As multiplication is more expensive
      than addition, by using modified_coefficient we get
      a faster seiving process.
  
      Parameters
      ==========
  
      modified_coeff : modified_coefficient of sieve polynomial
      a : parameter of the sieve polynomial
      b : parameter of the sieve polynomial
      """
      self.modified_coeff = modified_coeff
      self.a = a
      self.b = b
  
imports: from sympy.core.random import _randint
  from sympy.external.gmpy import gcd, invert, sqrt
  from sympy.ntheory.residue_ntheory import _sqrt_mod_prime_power
  from sympy.ntheory import isprime
  from math import log, sqrt
label_desc: Use image node_id 1 to create a new SievePolynomial object  with example: obj = SievePolynomial(modified_coeff, a, b)