From 832a20fd3c7ce36c68d6210eb18b30449b9ff30a Mon Sep 17 00:00:00 2001 From: Doug Torrance Date: Sun, 19 Jan 2025 16:23:35 -0500 Subject: [PATCH] Add tests for "sign" --- M2/Macaulay2/tests/normal/numbers.m2 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/M2/Macaulay2/tests/normal/numbers.m2 b/M2/Macaulay2/tests/normal/numbers.m2 index 93a67cea04..4c7b706f00 100644 --- a/M2/Macaulay2/tests/normal/numbers.m2 +++ b/M2/Macaulay2/tests/normal/numbers.m2 @@ -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"