<commit_before>""" Tests from <NAME>'s 1999 paper "Review of CAS mathematical
capabilities".

http://www.math.unm.edu/~wester/cas/book/Wester.pdf
See also http://math.unm.edu/~wester/cas_review.html for detailed output of each
tested system.
"""

from sympy import (Rational, symbols, factorial, sqrt, log, exp, oo, product,
    binomial, rf, pi, gamma, igcd, factorint, nsimplify, radsimp, combsimp,
    npartitions, totient, primerange, factor, simplify, gcd, resultant, expand,
    normal, I, trigsimp, tan, sin, cos, diff, nan, limit, EulerGamma, polygamma,
    bernoulli, assoc_legendre, Function, re, im, DiracDelta, chebyshevt, atan,
    sinh, cosh, Symbol, floor, ceiling)
from sympy.integrals.deltafunctions import deltaintegrate
from sympy.utilities.pytest import XFAIL, skip
from sympy.mpmath import mpi, mpc
from sympy import mpmath

R = Rational
x,y,z = symbols('x','y','z')
i,j,k,l,m,n = symbols('i', 'j', 'k', 'l', 'm', 'n', integer=True)
f = Function('f')
g = Function('g')

# A. Boolean Logic and Quantifier Elimination
#   Not implemented.

# B. Set Theory
#   Not implemented.

# C. Numbers

def test_C1():
    assert (factorial(50) ==
        30414093201713378043612608166064768844377641568960512000000000000)

def test_C2():
    assert (factorint(factorial(50)) == [(2, 47), (3, 22), (5, 12), (7, 8),
        (11, 4), (13, 3), (17, 2), (19, 2), (23, 2), (29, 1), (31, 1), (37, 1),
        (41, 1), (43, 1), (47, 1)])

@XFAIL
def test_C3():
    raise NotImplementedError("10!! == 3840\n"
        " 9!! == 945")

# Base conversions; not really implemented by sympy
# Whatever. Take credit!<commit_msg>Fixed factorint test. The other two tests that fail work in the latest patch.<commit_after>""" Tests from <NAME>'s 1999 paper "Review of CAS mathematical
capabilities".

http://www.math.unm.edu/~wester/cas/book/Wester.pdf
See also http://math.unm.edu/~wester/cas_review.html for detailed output of each
tested system.
"""

from sympy import (Rational, symbols, factorial, sqrt, log, exp, oo, product,
    binomial, rf, pi, gamma, igcd, factorint, nsimplify, radsimp, combsimp,
    npartitions, totient, primerange, factor, simplify, gcd, resultant, expand,
    normal, I, trigsimp, tan, sin, cos, diff, nan, limit, EulerGamma, polygamma,
    bernoulli, assoc_legendre, Function, re, im, DiracDelta, chebyshevt, atan,
    sinh, cosh, Symbol, floor, ceiling)
from sympy.integrals.deltafunctions import deltaintegrate
from sympy.utilities.pytest import XFAIL, skip
from sympy.mpmath import mpi, mpc
from sympy import mpmath

R = Rational
x,y,z = symbols('x','y','z')
i,j,k,l,m,n = symbols('i', 'j', 'k', 'l', 'm', 'n', integer=True)
f = Function('f')
g = Function('g')

# A. Boolean Logic and Quantifier Elimination
#   Not implemented.

# B. Set Theory
#   Not implemented.

# C. Numbers

def test_C1():
    assert (factorial(50) ==
        30414093201713378043612608166064768844377641568960512000000000000)

def test_C2():
    assert factorint(factorial(50)) == {2: 47, 3: 22, 5: 12, 7: 8, 
    11: 4, 13: 3, 17: 2, 19: 2, 23: 2, 29: 1, 31: 1, 37: 1, 41: 1, 43: 1, 47: 1}
@XFAIL
def test_C3():
    raise NotImplementedError("10!! == 3840\n"
        " 9!! == 945")

# Base conversions; not really implemented by sympy
# Whatever. Take credit!
{'fraction_non_alphanumeric': 0.15030674846625766, 'fraction_numerical': 0.07975460122699386, 'mean_word_length': 4.2938311688311686, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3199572', 'n_tokens_mistral': 1400, 'n_tokens_neox': 1186, 'n_words': 372}