## Reference.Abs History

Hide minor edits - Show changes to markup

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 -

Added lines 28-32:

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 -

Added lines 17-27:

#### 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 -

Added lines 1-17:

## abs(x)

#### Description

Computes the absolute value of a number.

#### Parameters

x: the number

#### Returns

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

**-x**: if **x** is less than 0.

Reference Home