## Reference.Abs History

April 03, 2015, at 10:02 AM by Arturo -
Changed line 21 from:

[@

to:
Changed lines 24-29 from:

a++; // use this instead - abs(a); // keep other math outside the function @]

to:
February 06, 2010, at 09:26 AM by David A. Mellis -
Changed lines 29-32 from:

to:
February 06, 2010, at 02:51 AM by Paul Badger -

January 27, 2009, at 12:26 PM by David A. Mellis -
Changed lines 22-25 from:

abs(a - 100, 0); // avoid this - yields incorrect results

a -= 100; // use this instead - abs(a, 100); // keep other math outside the function

to:

abs(a++); // avoid this - yields incorrect results

a++; // use this instead - abs(a); // keep other math outside the function

January 27, 2009, at 06:56 AM by Paul Badger -
Changed lines 19-20 from:

Because of the way the abs() function is implemented, avoid using other functions inside the brackets, it may lead to incorrect results

to:

Because of the way the abs() function is implemented, avoid using other functions inside the brackets, it may lead to incorrect results.

January 27, 2009, at 06:56 AM by Paul Badger -
January 27, 2009, at 06:55 AM by Paul Badger -
Changed lines 19-20 from:

Because of the way the max() function is implemented, avoid using other functions inside the brackets, it may lead to incorrect results

to:

Because of the way the abs() function is implemented, avoid using other functions inside the brackets, it may lead to incorrect results

January 27, 2009, at 06:55 AM by Paul Badger -

#### Warning

Because of the way the max() function is implemented, avoid using other functions inside the brackets, it may lead to incorrect results

```abs(a - 100, 0);   // avoid this - yields incorrect results

a -= 100;          // use this instead -
abs(a, 100);       // keep other math outside the function

```
April 16, 2007, at 06:07 PM by Paul Badger -
Deleted line 16:
December 02, 2006, at 06:59 PM by David A. Mellis -

## abs(x)

#### Description

Computes the absolute value of a number.

x: the number

#### Returns

x: if x is greater than or equal to 0.

-x: if x is less than 0.