Define a valid interval for the `tan` function, so that: ``domain_tan(eps) = True`` where ``abs(cos(x)) < eps``
| 871 | |
| 872 | |
| 873 | class _DomainTan: |
| 874 | """ |
| 875 | Define a valid interval for the `tan` function, so that: |
| 876 | |
| 877 | ``domain_tan(eps) = True`` where ``abs(cos(x)) < eps`` |
| 878 | |
| 879 | """ |
| 880 | |
| 881 | def __init__(self, eps): |
| 882 | "domain_tan(eps) = true where abs(cos(x)) < eps)" |
| 883 | self.eps = eps |
| 884 | |
| 885 | def __call__(self, x): |
| 886 | "Executes the call behavior." |
| 887 | with np.errstate(invalid='ignore'): |
| 888 | return umath.less(umath.absolute(umath.cos(x)), self.eps) |
| 889 | |
| 890 | |
| 891 | class _DomainSafeDivide: |
no outgoing calls
no test coverage detected
searching dependent graphs…