You are on page 1of 1

C Compiler Reference Manual

ABS()
Syntax:

value = abs(x)

Parameters:

x is a signed 8, 16, or 32 bit int or a float

Returns:

Same type as the parameter.

Function:

Computes the absolute value of a number.

Availability:

All devices

Requires

#include <stdlib.h>

Examples:

signed int target,actual;


...
error = abs(target-actual);

Example Files:

None

Also See:

labs()

ACOS()
See:

SIN()

ASIN()
See:

SIN()

88

You might also like