> For the complete documentation index, see [llms.txt](https://docs.cheddar.vihan.org/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cheddar.vihan.org/docs/mathematics/sign.md).

# Sign

## Syntax

```swift
sign x
```

## Explanation

`sign` returns the sign of the operand as `-1`, `0`, or `1`

## Examples

```swift
sign 1    // 1
sign 100  // 1
sign 0    // 0
sign -1   // -1
sign -100 // -1
```
