So, in short, on your planet, in Perl, '<=' does not test
for equality, while here on Earth, it does.
Does not.
At least not in a way that matters for floating point.
Let's get down to machine level: say we have a constant float $a, and a
value $b which is the result of a lengthy calculation. $a is exact,
because we wrote it down as a constant in the source code, and took good
care that it is a number that can actually be represented in binary
floating point without any error. $a=1.0 will do fine, but it does not
matter. Being floating point numbers, $b will most definitely not be
exact, but will shift around the theoretical target value by some margin
of error.
Let us assume a benign algorithm, constructed by a wise mathemagician,
which guarantees that $b will always end up in a well known interval
around $a. Let us assume that this interval is simply $a itself surrounded
by the 4 next larger or smaller numbers that can be represented as IEEE
floating point numbers (this assumption is conceptually well defined since
IEEE FP numbers are rather strict in this respect, i.e. every number that
can actually be represented in IEEE FP has exactly one, and not several,
legal representations). Let's also assume that each of those 9 results is
as likely as the others. Then we can write little diagrams where "*" means
"one of the close neighbours" and "!" means "exactly $a as represented in
IEEE FP". Underneath, we write "1" or "0" depending on the actual result
of the operator.
We do that for each of the operators "==", "<=" and "<":
For $a==$b, expected result TRUE:
* * * * ! * * * *
0 0 0 0 1 0 0 0 0
=> in 8 out of 9 cases, $a == $b will turn out FALSE. (This operator does
not matter to this thought experiment, but is included for fun)
For $a<$b, expected result FALSE:
* * * * ! * * * *
0 0 0 0 0 1 1 1 1
=> in 4 out of 9 cases, "$a < $b" will turn out TRUE.
For $a<=$b, expected result TRUE:
* * * * ! * * * *
0 0 0 0 1 1 1 1 1
=> in 4 out of 9 cases, $a<=$b will turn out FALSE. ..... hey, that's the
same probability!
The important point is the fact that the error percentage for "<" and "<="
is exactly the same. This holds for all cases where you use "<" and "<="
in the context of floating points: you can safely exchange "<" vs. "<=" in
most FP algorithms and it will not matter at all (exceptions, especially
constructed ones, nonwithstanding).
(NB: while not related to the question at hand, this also shows why == and
< / <= are very different beasts for floating point numbers. For larger
amounts of possible values for $b (larger error margin), the error
percentage of == quickly approaches 100%, while the percentage for < and
<= approximates 50%. While the usefulness of == quickly degrades to zero,
the usefulness of < and <= always stay around 50%, even if $b has an
arbitrarily large (!) error interval (centered around $a with equal
distribution, of course). And in the opposite extreme, where $b can take 3
possible values, == is wrong in 2 out of 3 cases, while < and <= are wrong
in 1 out of 3 cases.)
I love math. ;-)