Discussion about math, puzzles, games and fun. Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °
You are not logged in.
Post a reply
Topic review (newest first)
Yes, I am allowed to use min() and max() functions, and right now I actually have an equation similar to the one you showed here. It works perfectly but I still believe there is a way to avoid individual calculations of these distances.
Here's an awkward way to avoid absolute value signs:
max value of a and b = (a + b + |a - b|) / 2
Hi my friend. If you are allowed to use the absolute value operator, I do believe an elegant solution will arrive. For starters, let's couple together the dbottom with the dtop in an expression to find the one that is positive. And also let's couple together the dleft with the dright in an expression to find the one that is positive meaning non-negative. In these two cases, we simply need a "maximum finder" equation that uses the absolute value signs. After these two terms are resolved, they can be embedded in the larger single equation in which the "minimum of two values" is found, and that is the answer. Now let me give you an idea as to how one would find the max value of two numbers with the absolute value sign. See next post for more details...