--- title: "signum()" slug: "math-sign" updated: 2026-08-13T13:21:41Z published: 2026-08-13T13:21:41Z canonical: "docs.lobstersoftware.com/math-sign" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # signum() The mathematical sign function. -1 if **a** < 0. 0 if **a** = 0. 1 if **a** > 0. ## Parameters | Parameter | Description | | --- | --- | | a | Numerical value | ## Examples | Parameter a | Result | | --- | --- | | -7 | -1 | | 0 | 0 | | 5 | 1 | | mystring | 0 **NOTE:** An implicit type conversion of each string to the numerical value 0 takes place internally.) |