Felipe Micaroni Lalli
Reputation
Top tag
Next privilege 125 Rep.
Vote down
 Oct26 revised How to find the function $f$ that satisfies $f(x, y) = f(x^{-1}, y^{-1})^{-1}$ and $f(x, y)$ is $\approx$ $average(x, y)$? added 80 characters in body Oct26 revised How to find the function $f$ that satisfies $f(x, y) = f(x^{-1}, y^{-1})^{-1}$ and $f(x, y)$ is $\approx$ $average(x, y)$? adding more conditions Oct24 awarded Citizen Patrol Oct23 comment How to find the function $f$ that satisfies $f(x, y) = f(x^{-1}, y^{-1})^{-1}$ and $f(x, y)$ is $\approx$ $average(x, y)$? It does not fit $min(x, y) < f(x, y) < max(x, y)$ e.g.: $f(5, 8) = \frac{64}{5} > max(x, y)$. I will use $\sqrt{xy}$ with a slight modification (see the link on pastebin above). It works for me. --- I could use $f(x, y) = x$ as you suggest (actually it was my first thought) but despite being close, it would favor one side, and my algorithm is about disputes. Oct23 awarded Autobiographer Oct23 comment How to find the function $f$ that satisfies $f(x, y) = f(x^{-1}, y^{-1})^{-1}$ and $f(x, y)$ is $\approx$ $average(x, y)$? $f(x, y) = x^2y^{-1}$ does not work for me because $f(x, y) \neq f(y, x)$. I just forget to put this condition because (not sure why) I unconsciously assumed it was a natural consequence to first condition. Accidentally the solution $f(x, y)=\sqrt{xy}$ also satisfies $f(x, y) = f(y, x)$. DanielV, could you please send me an email, I just want to thank you for your effort and useful help. Oct22 comment How to find the function $f$ that satisfies $f(x, y) = f(x^{-1}, y^{-1})^{-1}$ and $f(x, y)$ is $\approx$ $average(x, y)$? Finally I solved my problem. Thank you for everyone that helped me. If you guys are interested how looks like the "final function" that fits to my problem, I put it here: pastebin.com/KcqaKNSk Oct22 revised How to find the function $f$ that satisfies $f(x, y) = f(x^{-1}, y^{-1})^{-1}$ and $f(x, y)$ is $\approx$ $average(x, y)$? deleted 30 characters in body Oct22 comment How to find the function $f$ that satisfies $f(x, y) = f(x^{-1}, y^{-1})^{-1}$ and $f(x, y)$ is $\approx$ $average(x, y)$? Great! I didn't realize that before, but in my case $x \approx y$. So, the first aprox. that you and Macavity have proposed to me $f(x, y) = \sqrt{xy}$ works very well to solve my problem. --- But now, I have a collateral effect: the system works only with rational numbers, and using square root I introduce irrational, what brings me another problem that I didn't solve yet. I am thinking in "cut" the number and transform: e.g. 999.999499999875 in 9999994/10000, but not sure yet if it will work to all cases. Is it possible to find a solution that also satisfies $f(x, y) \in\mathbb{Q}$ ? Oct22 revised How to find the function $f$ that satisfies $f(x, y) = f(x^{-1}, y^{-1})^{-1}$ and $f(x, y)$ is $\approx$ $average(x, y)$? better notation Oct22 revised How to find the function $f$ that satisfies $f(x, y) = f(x^{-1}, y^{-1})^{-1}$ and $f(x, y)$ is $\approx$ $average(x, y)$? using min/max Oct22 awarded Scholar Oct22 accepted How to find the function $f$ that satisfies $f(x, y) = f(x^{-1}, y^{-1})^{-1}$ and $f(x, y)$ is $\approx$ $average(x, y)$? Oct22 comment How to find the function $f$ that satisfies $f(x, y) = f(x^{-1}, y^{-1})^{-1}$ and $f(x, y)$ is $\approx$ $average(x, y)$? @Macavity thanks and congratulations! Please put it as answer and I will accept that. It works for me. If you want, explain in the answer how did you get that. Oct22 comment How to find the function $f$ that satisfies $f(x, y) = f(x^{-1}, y^{-1})^{-1}$ and $f(x, y)$ is $\approx$ $average(x, y)$? @Macavity wow! (sqrt (* x y)) is pretty amazing! How did you get that? In my tests does not work, but the difference is very very close to zero. Maybe something is wrong with the sqrt fn I am using. Maybe I need a more precise sqrt function. Oct22 awarded Editor Oct22 comment How to find the function $f$ that satisfies $f(x, y) = f(x^{-1}, y^{-1})^{-1}$ and $f(x, y)$ is $\approx$ $average(x, y)$? Thank you! The average is not strictly necessary. It is fair if x < f(x, y) < y Oct22 revised How to find the function $f$ that satisfies $f(x, y) = f(x^{-1}, y^{-1})^{-1}$ and $f(x, y)$ is $\approx$ $average(x, y)$? added 47 characters in body Oct22 awarded Student Oct22 asked How to find the function $f$ that satisfies $f(x, y) = f(x^{-1}, y^{-1})^{-1}$ and $f(x, y)$ is $\approx$ $average(x, y)$?