Here's a simple WolframCloud computation:
The answer is 1 when 0 < x < 1 is True and 0 when 0 < x < 1 is False, so why in the world does the output associate True
with 0?
(In WolframAlpha, executing Limit[Boole[0<x<1] (1 + 1/a) ,a->Infinity]
displays the correct answer, i.e., Boole[0<x<1]
, but the strange result is still found when you click "Open code".)
EDIT: An alternative form that gives the same result is
f[x_,a_]:=Boole[0<x<1] (1 + 1/a)
Limit[f[x,a],a->Infinity]
The output should be Boole[0<x<1]
, but instead is the strangeness involving True
.
Although at first it seems quite strange (or, indeed, a bug), in Wolfram language this is a standard usage of True in the output of piecewise functions, where it has the meaning of "otherwise" (when all the other listed conditions, which are to be evaluated in order, are False).
In other words, such an output expression is to be understood as a list of {value, condition} pairs, which evaluates to the first listed value whose condition is True, as in the following examples: