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

# labs(3)

return the absolute value of a long integer

## NAME

**labs** – return the absolute value of a long integer

## LIBRARY

Standard C Library (libc, -lc)

## SYNOPSIS

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

*long*\

**labs**(*long i*);

## DESCRIPTION

The **labs**() function returns the absolute value of the long integer *i*.

## SEE ALSO

[abs(3)](/abs/3.md), [cabs(3)](/cabs/3.md), [floor(3)](/floor/3.md), [imaxabs(3)](/imaxabs/3.md), [llabs(3)](/llabs/3.md), [math(3)](/math/3.md)

## STANDARDS

The **labs**() function conforms to ISO/IEC 9899:1990 (“ISO C90”).

## BUGS

The absolute value of the most negative integer remains negative.
