---
name: "wnabs"
section: "3"
platform: "linux"
package: "libwn-dev"
version: "6.0-17"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/wnabs"
---

# wnabs(3)

find absolute value, sign

## NAME

wn\_abs, wn\_sign - find absolute value, sign

## SYNOPSIS

```
#include <wn/wnabs.h>

wn_abs(x)

wn_sign(x)
```

## DESCRIPTION

**wn\_abs** is a macro which returns the absolute value of *x*. *x* may be of any type for which the C \<\<\> operator is defined.

**wn\_sign** returns -1, 0, or 1 according to whether *x* is \<, ==, or \>  zero.  *x* may be of any type for which the C \<\<\> operator is defined.

## SEE ALSO

wnmax, wnint

## AUTHOR

Will Naylor
