---
name: "abs"
section: "3"
platform: "macos"
package: "Libc"
version: "1752.120.2"
release: "macOS 26.5"
platforms: ["linux", "freebsd", "macos"]
url: "https://new.carta.tech/abs"
---

# abs(3)

integer absolute value function

## NAME

**abs** – integer absolute value function

## LIBRARY

Standard C Library (libc, -lc)

## SYNOPSIS

**#include \<stdlib.h\>**

*int*\

**abs**(*int i*);

## DESCRIPTION

The **abs**() function computes the absolute value of the integer *i*.

## RETURN VALUES

The **abs**() function returns the absolute value.

## SEE ALSO

[cabs(3)](/cabs/3.md), [fabs(3)](/fabs/3.md), [floor(3)](/floor/3.md), [hypot(3)](/hypot/3.md), [imaxabs(3)](/imaxabs/3.md), [labs(3)](/labs/3.md), [llabs(3)](/llabs/3.md), [math(3)](/math/3.md)

## STANDARDS

The **abs**() function conforms to ISO/IEC 9899:1999 (“ISO C99”).

## BUGS

The absolute value of the most negative integer remains negative.
