def store_multprec_laurent_system(polsys, decimals, **nbvar): r""" Stores the Laurent polynomials represented by the list of strings in *polsys* into the container for systems with coefficients in multiprecision. The parameter *decimals* equals the number of decimal places in the working precision for the parsing of the strings in *polsys*. If *nbvar* is omitted, then the system is assumed to be square. Otherwise, suppose the number of variables equals 2 and pols is the list of polynomials, then **store_multprec_laurent_system(pols, nbvar=2)** stores the polynomials in pols in the multprec Laurent systems container. """ from phcpy.phcpy2c3 import py2c_syscon_clear_multprec_Laurent_system from phcpy.phcpy2c3 \ import py2c_syscon_initialize_number_of_multprec_Laurentials from phcpy.phcpy2c3 import py2c_syscon_store_multprec_Laurential py2c_syscon_clear_multprec_Laurent_system() dim = len(polsys) py2c_syscon_initialize_number_of_multprec_Laurentials(dim) for cnt in range(0, dim): pol = polsys[cnt] nchar = len(pol) if len(nbvar) == 0: fail = py2c_syscon_store_multprec_Laurential\ (nchar, dim, cnt+1, decimals, pol) else: nvr = list(nbvar.values())[0] fail = py2c_syscon_store_multprec_Laurential\ (nchar, nvr, cnt+1, decimals, pol) if(fail != 0): break return fail
def store_multprec_laurent_system(polsys, decimals, **nbvar): r""" Stores the Laurent polynomials represented by the list of strings in *polsys* into the container for systems with coefficients in multiprecision. The parameter *decimals* equals the number of decimal places in the working precision for the parsing of the strings in *polsys*. If *nbvar* is omitted, then the system is assumed to be square. Otherwise, suppose the number of variables equals 2 and pols is the list of polynomials, then **store_multprec_laurent_system(pols, nbvar=2)** stores the polynomials in pols in the multprec Laurent systems container. """ from phcpy.phcpy2c3 import py2c_syscon_clear_multprec_Laurent_system from phcpy.phcpy2c3 \ import py2c_syscon_initialize_number_of_multprec_Laurentials from phcpy.phcpy2c3 import py2c_syscon_store_multprec_Laurential py2c_syscon_clear_multprec_Laurent_system() dim = len(polsys) fail = 0 py2c_syscon_initialize_number_of_multprec_Laurentials(dim) for cnt in range(0, dim): pol = polsys[cnt] nchar = len(pol) if len(nbvar) == 0: fail = py2c_syscon_store_multprec_Laurential\ (nchar, dim, cnt+1, decimals, pol) else: nvr = list(nbvar.values())[0] fail = py2c_syscon_store_multprec_Laurential\ (nchar, nvr, cnt+1, decimals, pol) if (fail != 0): break return fail
def store_multprec_laurent_system(polsys, decimals): """ Stores the Laurent polynomials represented by the list of strings in polsys into the container for systems with coefficients in multiprecision. The parameter decimals equals the number of decimal places in the working precision for the parsing of the strings in polsys. """ from phcpy.phcpy2c3 import py2c_syscon_clear_multprec_Laurent_system from phcpy.phcpy2c3 \ import py2c_syscon_initialize_number_of_multprec_Laurentials from phcpy.phcpy2c3 import py2c_syscon_store_multprec_Laurential py2c_syscon_clear_multprec_Laurent_system() dim = len(polsys) py2c_syscon_initialize_number_of_multprec_Laurentials(dim) for cnt in range(0, dim): pol = polsys[cnt] nchar = len(pol) fail = py2c_syscon_store_multprec_Laurential\ (nchar, dim, cnt+1, decimals, pol) if(fail != 0): break return fail