All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Just Math
Extremum Expressions (Posted on 2012-10-15) Difficulty: 2 of 5
Express each of max(x,y) and min(x,y) in terms of abs function.

No Solution Yet Submitted by K Sengupta    
Rating: 3.5000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution This should do it (spoiler) | Comment 3 of 4 |
Start at the midpoint, and then either add or subtract half the absolute difference

min(x,y)  = (x+y)/2 - abs(x-y)/2

max(x,y) = (x+y)/2 + abs(x-y)/2


min(x,y)  = (x+y - abs(x-y))/2

max(x,y) = (x+y + abs(x-y))/2

  Posted by Steve Herman on 2012-10-15 14:12:46
Please log in:
Remember me:
Sign up! | Forgot password

Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (1)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Copyright © 2002 - 2018 by Animus Pactum Consulting. All rights reserved. Privacy Information