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

Simplifying,

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:
Login:
Password:
Remember me:
Sign up! | Forgot password


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

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information