float absoluteValue( float x ) { float result = x; if( x < 0 ) { result = -1 * x; } return result; }