diff --git a/M2/Macaulay2/packages/Macaulay2Doc/functions.m2 b/M2/Macaulay2/packages/Macaulay2Doc/functions.m2 index 0f33fc7054..c3dd482170 100644 --- a/M2/Macaulay2/packages/Macaulay2Doc/functions.m2 +++ b/M2/Macaulay2/packages/Macaulay2Doc/functions.m2 @@ -227,6 +227,7 @@ load "./functions/setRandomSeed-doc.m2" load "./functions/setupLift-doc.m2" load "./functions/setupPromote-doc.m2" load "./functions/show-doc.m2" +load "./functions/sign-doc.m2" load "./functions/sin-doc.m2" load "./functions/sinh-doc.m2" load "./functions/smithNormalForm-doc.m2" diff --git a/M2/Macaulay2/packages/Macaulay2Doc/functions/sign-doc.m2 b/M2/Macaulay2/packages/Macaulay2Doc/functions/sign-doc.m2 new file mode 100644 index 0000000000..d8cb5a7c6f --- /dev/null +++ b/M2/Macaulay2/packages/Macaulay2Doc/functions/sign-doc.m2 @@ -0,0 +1,26 @@ +doc /// + Key + sign + (sign, Number) + (sign, Constant) + Headline + sign (signum) function + Usage + sign x + Inputs + x:Number + Outputs + :{ZZ,CC} + Description + Text + When @VAR "x"@ is real, then this returns 1 if it is positive, -1 if it + is negative, and 0 if it is zero. + Example + sign 5 + sign (-3) + sign 0 + Text + If @VAR "x"@ is complex and nonzero, then this returns $x/|x|$. + Example + sign(-7*ii) +///