How do you check if two different acyclic graphs of lazy generators represent the same number?
I do not see how this can be possible. Wouldn't that amount to prove a lot of hard math theorems (e.g, riemann hypothesis)?
I do not see how this can be possible. Wouldn't that amount to prove a lot of hard math theorems (e.g, riemann hypothesis)?
# Idealistically inclined folks, who would prefer their
# computations to hang rather than to yield a heuristic result,
# can achieve this effect by setting accuracy to a negative
# value. By the
# Gauss-Kuzmin theorem [5, 6], a partial quotient in the
# continued fraction expansion of almost every number exceeds
# 1e+31 with probability log2(1+1e-31) =~= 1e-31/ln(2) =~=
# 1.5e-31.Notice that this result does not say that most numbers have bounded partial quotients. In fact, a classical result in diophantine approximation theory, if I recall correctly, says that the set of numbers whose partial fractions are bounded (called badly aproximable numbers) is of Lebesgue measure zero. Thus, if your system represents real numbers by sequences of bounded partial quotients, then it can only represent a negligible (but uncountable) set of real numbers. A "random" number in [0,1] will certainly have an unbounded sequence of partial quotients (i.e., with probability 1).
if (x < 1):
may halt, trying to compute x to a higher and higher precision?