Skip to content

Commit e078418

Browse files
committed
Add tests
1 parent cf2190d commit e078418

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

mathics/builtin/numbers/algebra.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,9 @@ class Apart(Builtin):
386386
But it does not touch other expressions:
387387
>> Sin[1 / (x ^ 2 - y ^ 2)] // Apart
388388
= Sin[1 / (x ^ 2 - y ^ 2)]
389+
390+
>> a == "A" // Apart
391+
= a == "A"
389392
"""
390393

391394
attributes = A_LISTABLE | A_PROTECTED
@@ -432,6 +435,10 @@ class Cancel(Builtin):
432435
433436
>> Cancel[f[x] / x + x * f[x] / x ^ 2]
434437
= 2 f[x] / x
438+
439+
But it does not touch other expressions:
440+
>> a == "A" // Cancel
441+
= a == "A"
435442
"""
436443

437444
attributes = A_LISTABLE | A_PROTECTED
@@ -1385,6 +1392,10 @@ class Factor(Builtin):
13851392
You can use Factor to find when a polynomial is zero:
13861393
>> x^2 - x == 0 // Factor
13871394
= x (-1 + x) == 0
1395+
1396+
But it does not touch other expressions:
1397+
>> a == "A" // Factor
1398+
= a == "A"
13881399
"""
13891400

13901401
attributes = A_LISTABLE | A_PROTECTED

0 commit comments

Comments
 (0)