Skip to content

Commit

Permalink
Add tests for "sign"
Browse files Browse the repository at this point in the history
  • Loading branch information
d-torrance committed Jan 19, 2025
1 parent 2d2c766 commit 447f563
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions M2/Macaulay2/tests/normal/numbers.m2
Original file line number Diff line number Diff line change
Expand Up @@ -1081,6 +1081,11 @@ assert( not isANumber ((1/0.-1/0.) + 1*ii) )
assert( not isANumber (1 + (ii/0.-ii/0.) ) )
assert( not isANumber ((1 + ii/0.) - ii/0. ) )

assert( sign 5 == 1 )
assert( sign pi == 1 )
assert( sign 0/1 == 0 )
assert( sign(-3) == -1 )
assert( sign(-5 * ii) == -ii )

-- Local Variables:
-- compile-command: "make -C $M2BUILDDIR/Macaulay2/packages/Macaulay2Doc/test numbers.out"
Expand Down

0 comments on commit 447f563

Please sign in to comment.