github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/website/content/docs/job-specification/hcl2/functions/numeric/signum.mdx (about)

     1  ---
     2  layout: docs
     3  page_title: signum - Functions - Configuration Language
     4  description: The signum function determines the sign of a number.
     5  ---
     6  
     7  # `signum` Function
     8  
     9  `signum` determines the sign of a number, returning a number between -1 and
    10  1 to represent the sign.
    11  
    12  ## Examples
    13  
    14  ```shell-session
    15  > signum(-13)
    16  -1
    17  > signum(0)
    18  0
    19  > signum(344)
    20  1
    21  ```