Skip to content

Commit

Permalink
Merge 2011e3a into 3cdc368
Browse files Browse the repository at this point in the history
  • Loading branch information
skirpichev committed Dec 8, 2015
2 parents 3cdc368 + 2011e3a commit d576e37
Show file tree
Hide file tree
Showing 2 changed files with 170 additions and 318 deletions.
28 changes: 14 additions & 14 deletions sympy/functions/elementary/tests/test_trigonometric.py
Expand Up @@ -2,7 +2,7 @@
acos, Rational, sqrt, asin, acot, coth, E, S, tan, tanh, cos,
cosh, atan2, exp, log, asinh, acoth, atanh, O, cancel, Matrix, re, im,
Float, Pow, gcd, sec, csc, cot, diff, simplify, Heaviside, arg,
conjugate, series, FiniteSet, asec, acsc)
conjugate, series, FiniteSet, asec, acsc, sech, csch)
from sympy.core.compatibility import range
from sympy.utilities.pytest import XFAIL, slow, raises

Expand Down Expand Up @@ -531,15 +531,15 @@ def test_cot():
assert cot(7*pi/6) == sqrt(3)
assert cot(-5*pi/6) == sqrt(3)

assert cot(pi/8).expand() == 1 + sqrt(2)
assert cot(3*pi/8).expand() == -1 + sqrt(2)
assert cot(5*pi/8).expand() == 1 - sqrt(2)
assert cot(7*pi/8).expand() == -1 - sqrt(2)
assert cot(pi/8).simplify() == 1 + sqrt(2)
assert cot(3*pi/8).simplify() == -1 + sqrt(2)
assert cot(5*pi/8).simplify() == 1 - sqrt(2)
assert cot(7*pi/8).simplify() == -1 - sqrt(2)

assert cot(pi/12) == sqrt(3) + 2
assert cot(5*pi/12) == -sqrt(3) + 2
assert cot(7*pi/12) == sqrt(3) - 2
assert cot(11*pi/12) == -sqrt(3) - 2
assert cot(pi/12).simplify() == sqrt(3) + 2
assert cot(5*pi/12).simplify() == -sqrt(3) + 2
assert cot(7*pi/12).simplify() == sqrt(3) - 2
assert cot(11*pi/12).simplify() == -sqrt(3) - 2

assert cot(pi/24).radsimp() == sqrt(2) + sqrt(3) + 2 + sqrt(6)
assert cot(5*pi/24).radsimp() == -sqrt(2) - sqrt(3) + 2 + sqrt(6)
Expand Down Expand Up @@ -569,7 +569,7 @@ def test_cot():

assert cot(x).is_finite is None
assert cot(r).is_finite is None
i = Symbol('i', imaginary=True)
i = Symbol('i', imaginary=True, nonzero=True)
assert cot(i).is_finite is True

assert cot(x).subs(x, 3*pi) == zoo
Expand Down Expand Up @@ -1158,8 +1158,8 @@ def test_sec():
assert sec(5*pi/2) == zoo
assert sec(9*pi/7) == -sec(2*pi/7)
assert sec(3*pi/4) == -sqrt(2) # issue 8421
assert sec(I) == 1/cosh(1)
assert sec(x*I) == 1/cosh(x)
assert sec(I) == sech(1)
assert sec(x*I) == sech(x)
assert sec(-x) == sec(x)

assert sec(asec(x)) == x
Expand Down Expand Up @@ -1235,8 +1235,8 @@ def test_csc():
assert csc(5*pi/2) == 1
assert csc(9*pi/7) == -csc(2*pi/7)
assert csc(3*pi/4) == sqrt(2) # issue 8421
assert csc(I) == -I/sinh(1)
assert csc(x*I) == -I/sinh(x)
assert csc(I) == -I*csch(1)
assert csc(x*I) == -I*csch(x)
assert csc(-x) == -csc(x)

assert csc(acsc(x)) == x
Expand Down

0 comments on commit d576e37

Please sign in to comment.