link: Modus Operandi. Formulae for Maximum and Minimum of two numbers with a + b and $|a - b|$
And obviously it return first number all the time if i do it as mention for 3 numbers $1/2 ( add \text{ } 3 ) + ( sub \text{ } 3 )$ .
or even I try to calculate 2 numbers it just return fist number.
Is there any way I can find maximum from 3 numbers.
I do not have math background am programmer so excuse if you find it stupid but I seriously want to do it using a formula.
I can do it by natural way by iterating over remaining number but that will cost time of 3! or N!.
So please do share if you can point to me in a way so I do it mathematically.