I'm an old FORTRAN jockey, and that ancient language had two different functions for absolute value. IABS(I) for int arguments, and ABS(X) for Float arguments (aka REAL). IABS was always quicker than ABS, for obvious reasons (floating-point number always took more manipulations, point shifting etc.).

In the Arduino's language, I see there is only one function for absolute value, abs(x). Apparently it takes either int data types and returns an int, or a float datatype and returns a float. (Is this correct?)

I have a timing-critical program I'm working on, and I use integer math whenever I can.

My question is, is the abs of an integer variable, usually quicker than the abs of a float variable?

Anybody know?

Thanx all!