abs()

abs returns the absolute value of a result or a calculation, by converting negative numbers to positive numbers:

 

abs(-9) - returns 9

 

abs(18) - returns 18

Example:

in a regularity race where rankings are based on the precision of each participant in a specific timing point based on a specific time-table, you may want to calculate the absolute difference between the theoretical time and the real time and then rank participants from the more precise to the less precise.

By using abs(), negative times are treated as positive, and this makes it easy to evaluate the best performance of each athlete.