Révision 94 pobysoPythonSage/src/sageSLZ/sageSLZ.sage

sageSLZ.sage (revision 94)
366 366
    # Coefficients are issued in the increasing power order.
367 367
    ratPolyCoefficients = ratPolyOfInt.coefficients()
368 368
    # Print the reversed list for debugging.
369
    print ratPolyCoefficients[::-1]
370
    # Build the list of number we compute the lcmm of.
369
    print "Rational polynomial coefficients:", ratPolyCoefficients[::-1]
370
    # Build the list of number we compute the lcm of.
371 371
    coefficientDenominators = sro_denominators(ratPolyCoefficients)
372 372
    coefficientDenominators.append(2^precision)
373 373
    coefficientDenominators.append(2^(targetHardnessToRound + 1))
......
380 380
    # Iterate over two lists at the same time, stop when the shorter is
381 381
    # exhausted.
382 382
    for numerator, denominator in \
383
                            zip(coefficientNumerators, coefficientDenominators):
383
                        zip(coefficientNumerators, coefficientDenominators):
384 384
        multiplicator = leastCommonMultiple / denominator 
385 385
        newCoefficient = numerator * multiplicator
386 386
        polynomialExpression += newCoefficient * variable1^power

Formats disponibles : Unified diff