Skip to content

Commit

Permalink
Merge pull request #780 from Mathics3/a-few-abs-tests
Browse files Browse the repository at this point in the history
Add a couple more Abs tests...
  • Loading branch information
rocky authored Feb 6, 2023
2 parents 02bb5dd + ae60077 commit 9303b3b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/builtin/arithmetic/test_abs.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@
("Abs[-2/3]", "2/3", None),
("Abs[2+3 I]", "Sqrt[13]", None),
("Abs[2.+3 I]", "3.60555", None),
# TODO: Implement rules for these cases.
# ("Abs[4^(2 Pi)]", "4^(2 Pi)", None),
("Abs[Undefined]", "Undefined", None),
("Abs[E]", "E", None),
("Abs[Pi]", "Pi", None),
("Abs[Conjugate[x]]", "Abs[x]", None),
("Abs[4^(2 Pi)]", "4^(2 Pi)", None),
],
)
def test_abs(str_expr, str_expected, msg):
Expand All @@ -39,7 +42,7 @@ def test_abs(str_expr, str_expected, msg):
("Sign[2+3 I]", "(2 + 3 I)/(13^(1/2))", None),
("Sign[2.+3 I]", "0.5547 + 0.83205 I", None),
("Sign[4^(2 Pi)]", "1", None),
# FixME: add rules to handle this kind of case
# FIXME: add rules to handle this kind of case
# ("Sign[I^(2 Pi)]", "I^(2 Pi)", None),
# ("Sign[4^(2 Pi I)]", "1", None),
],
Expand Down

0 comments on commit 9303b3b

Please sign in to comment.