Popular Posts

Tuesday, February 14, 2012

Maximum of two values using abs

Given two number a and b,find out the maximum of two numbers?
max(a,b) = (abs(a+b)+abs(a-b))/2;

No comments:

Post a Comment