github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/website/content/docs/job-specification/hcl2/functions/numeric/signum.mdx (about)

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