You can see both triples are contained in one binary tree using the big diagram in section 3. The triple [3 4 5] has the "path" RR. The triple [4 3 5] the path R.
Yes, this is normal. I am sorry, I am working on a more efficient implementation.
The JavaScript of this page does a lot of number crunching.
It is actually doing arithmetic on the Stern-Brocot tree. It is all written in ClojureScript and not really optimized yet. I mention in the paper that I do not even use TCO.
Anyway, thank you - and all the people here - for the kind words! I am so happy that my article was so well received today.
I vouched for your submission and your comment. Just wanted to let you know that there seems to be some issue with your account causing your comments and submissions to be automatically flagged. You may want to contact HN moderators (hn@ycombinator.com) about that.
The authors have a look at the spectral line database of the NIST and make the surprising finding, that all atomic spectral lines together approximate very well a black body spectrum at a temperature of 9000K.
The authors not yet have an explanation for this conundrum, but also note, that this temperature plays a role in the formation theory of the universe.
Yes. The key to that is approximating reals by the second Ostrogradsky series (or, more properly, Ostrogradsky-Sierpiński series): x = ⎣x⎦ + 1/q₁ − 1/q₂ + 1/q₃ - 1/q₄ + ⋯, where the denominators qₖ are greedily chosen as the largest possible. The following formulas are true: exp(1/q) = [1; q−1, 1, 1, 3q−1, 1, 1, 5q-1,…], exp(x + y) = exp(x)exp(y), and exp(x - y) = exp(x)/exp(y).
The algorithm keeps two most recent partial sums of the O-S series: sₖ₋₁ and sₖ. As long as the partial quotients of exp(sₖ₋₁) and exp(sₖ) are equal, it emits them; otherwise, it computes the next partial sum sₖ₊₁. Similar formulas work for tan(x).