d5e00bf699fcf3a8a7c00d92bc499e8b0526bef7,sympy/functions/elementary/trigonometric.py,sin,_eval_as_leading_term,#sin#Any#Any#,480

Before Change



    def _eval_as_leading_term(self, x, cdir=0):
        from sympy import Order
        arg = self.args[0].as_leading_term(x)

        if x in arg.free_symbols and Order(1, x).contains(arg):
            return arg
        else:
            if not arg.subs(x, 0).is_finite:
                return self
            else:
                return self.func(arg)

    def _eval_is_extended_real(self):

After Change


        x0 = arg.subs(x, 0).cancel()
        n = x0/S.Pi
        if n.is_integer:
            lt = (arg - n*S.Pi).as_leading_term(x)
            return ((-1)**n)*lt
        return self.func(x0) if x0.is_finite else self

    def _eval_is_extended_real(self):
        if self.args[0].is_extended_real:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: sympy/sympy
Commit Name: d5e00bf699fcf3a8a7c00d92bc499e8b0526bef7
Time: 2021-03-05
Author: sidharthmundhra16@gmail.com
File Name: sympy/functions/elementary/trigonometric.py
Class Name: sin
Method Name: _eval_as_leading_term


Project Name: sympy/sympy
Commit Name: c6f7a6a3a7013be784c846aa4f90e5320e492d14
Time: 2021-02-12
Author: sidharthmundhra16@gmail.com
File Name: sympy/functions/elementary/integers.py
Class Name: floor
Method Name: _eval_as_leading_term


Project Name: sympy/sympy
Commit Name: c6f7a6a3a7013be784c846aa4f90e5320e492d14
Time: 2021-02-12
Author: sidharthmundhra16@gmail.com
File Name: sympy/functions/elementary/integers.py
Class Name: ceiling
Method Name: _eval_as_leading_term