Révision 269

pobysoPythonSage/src/sageSLZ/sageSLZ.sage (revision 269)
1664 1664

  
1665 1665
def slz_get_intervals_and_polynomials(functionSa, degreeSa, 
1666 1666
                                      lowerBoundSa, 
1667
                                      upperBoundSa, floatingPointPrecSa, 
1668
                                      internalSollyaPrecSa, approxPrecSa):
1667
                                      upperBoundSa, 
1668
                                      floatingPointPrecSa, 
1669
                                      internalSollyaPrecSa, 
1670
                                      approxAccurSa):
1669 1671
    """
1670 1672
    Under the assumption that:
1671 1673
    - functionSa is monotonic on the [lowerBoundSa, upperBoundSa] interval;
......
1690 1692
    # Set Sollya to the necessary internal precision.
1691 1693
    sollyaPrecChangedSa = False
1692 1694
    (initialSollyaPrecSo, initialSollyaPrecSa) = pobyso_get_prec_so_so_sa()
1693
    if internalSollyaPrecSa > currentSollyaPrecSa:
1695
    if internalSollyaPrecSa > initialSollyaPrecSa:
1694 1696
        if internalSollyaPrecSa <= 2:
1695 1697
            print inspect.stack()[0][3], ": precision change <=2 requested."
1696 1698
        pobyso_set_prec_sa_so(internalSollyaPrecSa)
......
1761 1763
        # If the error and interval are OK a the first try, just return.
1762 1764
        if (boundsSa.endpoints()[1] >= scaledUpperBoundSa) and \
1763 1765
            (errorSa <= approxAccurSa):
1764
            if precChangedSa:
1766
            if sollyaPrecChangedSa:
1765 1767
                pobyso_set_prec_so_so(initialSollyaPrecSo)
1766 1768
            sollya_lib_clear_obj(initialSollyaPrecSo)
1767 1769
            sollya_lib_clear_obj(functionSo)
......
1954 1956
    return((polynomialSa, polynomialChangedVarSa, intervalSa, centerSa, errorSa))
1955 1957
    # End slz_interval_and_polynomial_to_sage
1956 1958

  
1957
def slz_is_htrn(argument, function, targetAccuracy, targetRF = None, 
1958
            targetPlusOnePrecRF = None, quasiExactRF = None):
1959
def slz_is_htrn(argument, 
1960
                function, 
1961
                targetAccuracy, 
1962
                targetRF = None, 
1963
                targetPlusOnePrecRF = None, 
1964
                quasiExactRF = None):
1959 1965
    """
1960 1966
      Check if an element (argument) of the domain of function (function)
1961 1967
      yields a HTRN case (rounding to next) for the target precision 

Formats disponibles : Unified diff