diff --git a/src/sage/functions/bessel.py b/src/sage/functions/bessel.py index fe78e9e80d8..03e08dde154 100644 --- a/src/sage/functions/bessel.py +++ b/src/sage/functions/bessel.py @@ -297,29 +297,6 @@ def __init__(self): maxima='bessel_j', sympy='besselj')) - # remove after deprecation period - def __call__(self, *args, **kwds): - """ - Custom ``__call__`` method which uses the old Bessel function code if - the ``algorithm`` or ``prec`` arguments are used. This should be - removed after the deprecation period. - - EXAMPLES:: - - sage: bessel_J(0, 1.0, "maxima", 53) - doctest:1: DeprecationWarning: precision argument is deprecated; algorithm argument is currently deprecated, but will be available as a named keyword in the future - See http://trac.sagemath.org/4102 for details. - .7651976865579666 - """ - if len(args) > 2 or len(kwds) > 0: - from sage.misc.superseded import deprecation - deprecation(4102, 'precision argument is deprecated; algorithm ' - 'argument is currently deprecated, but will be ' - 'available as a named keyword in the future') - return _bessel_J(*args, **kwds) - else: - return super(BuiltinFunction, self).__call__(*args, **kwds) - def _eval_(self, n, x): """ EXAMPLES:: @@ -467,29 +444,6 @@ def __init__(self): maxima='bessel_y', sympy='bessely')) - # remove after deprecation period - def __call__(self, *args, **kwds): - """ - Custom ``__call__`` method which uses the old Bessel function code if - the ``algorithm`` or ``prec`` arguments are used. This should be - removed after the deprecation period. - - EXAMPLES:: - - sage: bessel_Y(0, 1, "maxima", 53) - doctest:1: DeprecationWarning: precision argument is deprecated; algorithm argument is currently deprecated, but will be available as a named keyword in the future - See http://trac.sagemath.org/4102 for details. - 0.0882569642156769 - """ - if len(args) > 2 or len(kwds) > 0: - from sage.misc.superseded import deprecation - deprecation(4102, 'precision argument is deprecated; algorithm ' - 'argument is currently deprecated, but will be ' - 'available as a named keyword in the future') - return _bessel_Y(*args, **kwds) - else: - return super(BuiltinFunction, self).__call__(*args, **kwds) - def _eval_(self, n, x): """ EXAMPLES:: @@ -639,29 +593,6 @@ def __init__(self): maxima='bessel_i', sympy='besseli')) - # remove after deprecation period - def __call__(self, *args, **kwds): - """ - Custom ``__call__`` method which uses the old Bessel function code if - the ``algorithm`` or ``prec`` arguments are used. This should be - removed after the deprecation period. - - EXAMPLES:: - - sage: bessel_I(0, 1, "maxima", 53) - doctest:1: DeprecationWarning: precision argument is deprecated; algorithm argument is currently deprecated, but will be available as a named keyword in the future - See http://trac.sagemath.org/4102 for details. - 1.266065877752009 - """ - if len(args) > 2 or len(kwds) > 0: - from sage.misc.superseded import deprecation - deprecation(4102, 'precision argument is deprecated; algorithm ' - 'argument is currently deprecated, but will be ' - 'available as a named keyword in the future') - return _bessel_I(*args, **kwds) - else: - return super(BuiltinFunction, self).__call__(*args, **kwds) - def _eval_(self, n, x): """ EXAMPLES:: @@ -836,29 +767,6 @@ def __init__(self): maxima='bessel_k', sympy='besselk')) - # remove after deprecation period - def __call__(self, *args, **kwds): - """ - Custom ``__call__`` method which uses the old Bessel function code if - the ``algorithm`` or ``prec`` arguments are used. This should be - removed after the deprecation period. - - EXAMPLES:: - - sage: bessel_K(0, 1, "maxima", 53) - doctest:1: DeprecationWarning: precision argument is deprecated; algorithm argument is currently deprecated, but will be available as a named keyword in the future - See http://trac.sagemath.org/4102 for details. - 0.0882569642156769 - """ - if len(args) > 2 or len(kwds) > 0: - from sage.misc.superseded import deprecation - deprecation(4102, 'precision argument is deprecated; algorithm ' - 'argument is currently deprecated, but will be ' - 'available as a named keyword in the future') - return _bessel_Y(*args, **kwds) - else: - return super(BuiltinFunction, self).__call__(*args, **kwds) - def _eval_(self, n, x): """ EXAMPLES:: diff --git a/src/sage/functions/exp_integral.py b/src/sage/functions/exp_integral.py index 182e80cbe3c..1c3650efdc4 100644 --- a/src/sage/functions/exp_integral.py +++ b/src/sage/functions/exp_integral.py @@ -1335,6 +1335,13 @@ class Function_exp_integral(BuiltinFunction): sage: Ei(-3 - 0.1*I) -0.0129379427181693 - 3.13993830250942*I + The precision for the result is deduced from the precision of the + input. Convert the input to a higher precision explicitly if a + result with higher precision is desired:: + + sage: Ei(RealField(300)(1.1)) + 2.16737827956340282358378734233807621497112737591639704719499002090327541763352339357795426 + ALGORITHM: Uses mpmath. TESTS: @@ -1413,33 +1420,6 @@ def _evalf_(self, x, parent=None, algorithm=None): import mpmath return mpmath_utils_call(mpmath.ei, x, parent=parent) - def __call__(self, x, prec=None, coerce=True, hold=False ): - """ - Note that the ``prec`` argument is deprecated. The precision for - the result is deduced from the precision of the input. Convert - the input to a higher precision explicitly if a result with higher - precision is desired. - - EXAMPLES:: - - sage: t = Ei(RealField(100)(2.5)); t - 7.0737658945786007119235519625 - sage: t.prec() - 100 - - sage: Ei(1.1, prec=300) - doctest:...: DeprecationWarning: The prec keyword argument is deprecated. Explicitly set the precision of the input, for example Ei(RealField(300)(1)), or use the prec argument to .n() for exact inputs, e.g., Ei(1).n(300), instead. - See http://trac.sagemath.org/7748 for details. - 2.16737827956340306615064476647912607220394065907142504328679588538509331805598360907980986 - """ - if prec is not None: - from sage.misc.superseded import deprecation - deprecation(7748, "The prec keyword argument is deprecated. Explicitly set the precision of the input, for example Ei(RealField(300)(1)), or use the prec argument to .n() for exact inputs, e.g., Ei(1).n(300), instead.") - import mpmath - return mpmath_utils_call(mpmath.ei, x, prec=prec) - - return BuiltinFunction.__call__(self, x, coerce=coerce, hold=hold) - def _derivative_(self, x, diff_param=None): """ EXAMPLES:: diff --git a/src/sage/functions/log.py b/src/sage/functions/log.py index 9a9c8d7175e..747a3af39c1 100644 --- a/src/sage/functions/log.py +++ b/src/sage/functions/log.py @@ -64,6 +64,17 @@ def __init__(self): sage: exp(7*pi*I/2) -I + The precision for the result is deduced from the precision of + the input. Convert the input to a higher precision explicitly + if a result with higher precision is desired:: + + sage: t = exp(RealField(100)(2)); t + 7.3890560989306502272304274606 + sage: t.prec() + 100 + sage: exp(2).n(100) + 7.3890560989306502272304274606 + TEST:: sage: latex(exp(x)) @@ -110,44 +121,6 @@ def __init__(self): GinacFunction.__init__(self, "exp", latex_name=r"\exp", conversions=dict(maxima='exp')) - def __call__(self, x, coerce=True, hold=False, prec=None, - dont_call_method_on_arg=False): - """ - Note that the ``prec`` argument is deprecated. The precision for - the result is deduced from the precision of the input. Convert - the input to a higher precision explicitly if a result with higher - precision is desired.:: - - sage: t = exp(RealField(100)(2)); t - 7.3890560989306502272304274606 - sage: t.prec() - 100 - - TESTS:: - - sage: exp(2,prec=100) - doctest:...: DeprecationWarning: The prec keyword argument is deprecated. Explicitly set the precision of the input, for example exp(RealField(300)(1)), or use the prec argument to .n() for exact inputs, e.g., exp(1).n(300), instead. - See http://trac.sagemath.org/7490 for details. - 7.3890560989306502272304274606 - - Ensure that :trac:`13608` is fixed:: - - sage: import mpmath - sage: a = mpmath.mpf('0.5') - sage: exp(a) - mpf('1.6487212707001282') - sage: a.exp - -1 - """ - if prec is not None: - from sage.misc.superseded import deprecation - deprecation(7490, "The prec keyword argument is deprecated. Explicitly set the precision of the input, for example exp(RealField(300)(1)), or use the prec argument to .n() for exact inputs, e.g., exp(1).n(300), instead.") - x = GinacFunction.__call__(self, x, coerce=coerce, hold=hold, - dont_call_method_on_arg=dont_call_method_on_arg) - return x.n(prec) - return GinacFunction.__call__(self, x, coerce=coerce, hold=hold, - dont_call_method_on_arg=dont_call_method_on_arg) - exp = Function_exp() class Function_log(GinacFunction): diff --git a/src/sage/functions/other.py b/src/sage/functions/other.py index 53c36fede90..8d4d8a07d9d 100644 --- a/src/sage/functions/other.py +++ b/src/sage/functions/other.py @@ -742,37 +742,28 @@ def __init__(self): ginac_name='tgamma', conversions={'mathematica':'Gamma','maple':'GAMMA'}) - def __call__(self, x, prec=None, coerce=True, hold=False): + def __call__(self, x, coerce=True, hold=False): """ - Note that the ``prec`` argument is deprecated. The precision for - the result is deduced from the precision of the input. Convert - the input to a higher precision explicitly if a result with higher - precision is desired.:: + The precision for the result is deduced from the precision of the + input. Convert the input to a higher precision explicitly if a result + with higher precision is desired.:: sage: t = gamma(RealField(100)(2.5)); t 1.3293403881791370204736256125 sage: t.prec() 100 - sage: gamma(6, prec=53) - doctest:...: DeprecationWarning: The prec keyword argument is deprecated. Explicitly set the precision of the input, for example gamma(RealField(300)(1)), or use the prec argument to .n() for exact inputs, e.g., gamma(1).n(300), instead. - See http://trac.sagemath.org/7490 for details. - 120.000000000000 + sage: gamma(6) + 120 TESTS:: - sage: gamma(pi,prec=100) + sage: gamma(pi).n(100) 2.2880377953400324179595889091 - sage: gamma(3/4,prec=100) + sage: gamma(3/4).n(100) 1.2254167024651776451290983034 """ - if prec is not None: - from sage.misc.superseded import deprecation - deprecation(7490, "The prec keyword argument is deprecated. Explicitly set the precision of the input, for example gamma(RealField(300)(1)), or use the prec argument to .n() for exact inputs, e.g., gamma(1).n(300), instead.") - import mpmath - return mpmath_utils.call(mpmath.gamma, x, prec=prec) - # this is a kludge to keep # sage: Q. = NumberField(x^2+1) # sage: gamma(i) @@ -788,8 +779,7 @@ def __call__(self, x, prec=None, coerce=True, hold=False): raise from sage.misc.superseded import deprecation - deprecation(7490, "Calling symbolic functions with arguments that cannot be coerced into symbolic expressions is deprecated.") - parent = RR if prec is None else RealField(prec) + parent = RR try: x = parent(x) except (ValueError, TypeError): @@ -1030,8 +1020,6 @@ def gamma(a, *args, **kwds): sage: Q. = NumberField(x^2+1) sage: gamma(i) - doctest:...: DeprecationWarning: Calling symbolic functions with arguments that cannot be coerced into symbolic expressions is deprecated. - See http://trac.sagemath.org/7490 for details. -0.154949828301811 - 0.498015668118356*I We make an exception for elements of AA or QQbar, which cannot be diff --git a/src/sage/functions/trig.py b/src/sage/functions/trig.py index 4860d02e623..38a6c2fdba6 100644 --- a/src/sage/functions/trig.py +++ b/src/sage/functions/trig.py @@ -870,7 +870,7 @@ def __init__(self): ValueError: arctan2(0,0) undefined Check if :trac:`10062` is fixed, this was caused by - ``(I*I)._is_positive()`` returning ``True``:: + ``(I*I).is_positive()`` returning ``True``:: sage: arctan2(0, I*I) pi diff --git a/src/sage/symbolic/expression.pyx b/src/sage/symbolic/expression.pyx index 16c4fc4f2a8..a19cf8795f5 100644 --- a/src/sage/symbolic/expression.pyx +++ b/src/sage/symbolic/expression.pyx @@ -1604,15 +1604,6 @@ cdef class Expression(CommutativeRingElement): return self.operator().name() return self._maxima_init_() - - _is_real = deprecated_function_alias(10859, is_real) - _is_positive = deprecated_function_alias(10859, is_positive) - _is_negative = deprecated_function_alias(10859, is_negative) - _is_integer = deprecated_function_alias(10859, is_integer) - _is_symbol = deprecated_function_alias(10859, is_symbol) - _is_constant = deprecated_function_alias(10859, is_constant) - _is_numeric = deprecated_function_alias(10859, is_numeric) - def is_real(self): """ Return True if this expression is known to be a real number. @@ -8166,7 +8157,6 @@ cdef class Expression(CommutativeRingElement): trig_simplify = simplify_trig - @rename_keyword(deprecation=6094, method="algorithm") def simplify_rational(self,algorithm='full', map=False): r""" Simplify rational expressions. @@ -8422,7 +8412,6 @@ cdef class Expression(CommutativeRingElement): radical_simplify = simplify_radical simplify_exp = exp_simplify = simplify_radical - @rename_keyword(deprecation=6094, method="algorithm") def simplify_log(self,algorithm=None): r""" Simplify symbolic expression, which can contain logs. @@ -8580,7 +8569,6 @@ cdef class Expression(CommutativeRingElement): log_simplify = simplify_log - @rename_keyword(deprecation=6094, method="algorithm") def expand_log(self,algorithm='products'): r""" Simplify symbolic expression, which can contain logs. @@ -9664,9 +9652,6 @@ cdef class Expression(CommutativeRingElement): return find_local_minimum(self._fast_float_(var), a=a, b=b, tol=tol, maxfun=maxfun ) - find_maximum_on_interval = deprecated_function_alias(2607, find_local_maximum) - find_minimum_on_interval = deprecated_function_alias(2607, find_local_minimum) - ################### # Fast Evaluation # ###################