3.5.1.1.1 Abs

Description

This function returns the absolute value of x.

Syntax

double abs(double x)

Note: the Origin C abs function is prototyped as int abs(int x).

Parameters

x

is the numeric value you want to get the absolute.

Return

Returns the absolute value of x.

Examples

abs(2.5)=; //ABS(2.5)=2.5
abs(-2.5)=; //ABS(-2.5)=2.5
abs(0)=; //ABS(0)=0
abs(0/0)=;  //giving a missing value, ABS(0/0)=--