I was checking the subadditivity of the function $f\colon x\mapsto \min(1, x)$, i.e., whether $f(x + y)\le f(x) + f(y)$ and was expecting that the entire first quadrant would be colored. However, the following was outputted:
But clearly, for nonnegative $x, y$ satisfying $x + y < 1$, $f(x + y) \le f(x) + f(y)$ reduces to $x + y\le x + y$, which is true! So, what is Desmos doing here? (Interested in knowing "what went wrong" in Desmos' plotting alog's (of which I have no knowledge of, and would be delighted to be enlightened about!).)
To investigate, I also tried plotting $x + y\le x + y$ (or simply $x\le x$ for that matter), and Desmos showed no shaded region!
Edit
The correct plot should have been the first and the third quadrants translated by $(1, 1)$. It turns out that the region that Desmos has wrongly omitted to plot is precisely where the equality holds, that is, where $f(x + y) = f(x) + f(y)$, and as Kurt G. points out, this might be due to having x == y for floats x, y instead of demanding that abs(x - y) be smaller than a small positive precision. And indeed, plotting $|f(x + y) - f(x) - f(y)| < 0.0001$ gives the (approximate) remaining portion:


==which is a bad idea. Good programmers apply the trick you used and defineequal(a,b)to befabs(a-b)smaller than a small constant. It is pure speculation from an outsider if that or something similar is happening here. – Kurt G. Mar 20 '24 at 06:02