Fellow Jedi -

There's a New Scientist article about some people who open-sourced some
code to attempt to accomplish Ramanujan-like discoveries in the area of
continued fractions:
https://www.newscientist.com/article/2209213-computer-attempts-to-replicate-the-dream-like-maths-of-ramanujan/
 .

Unfortunately it is paywalled, so I will fair-use a little here:

*The theorems Ramanujan produced often involved continued fractions, which
express a number as the sum of infinitely nested fractions.*

*To mimic this approach, Gal Raayoni at the Israel Institute of Technology
and his colleagues created the Ramanujan Machine
<http://arxiv.org/abs/1907.00205>. It has already come up with tens
of conjectures that use continued fractions to approximate π and e.*

*One method the program uses to search for new conjectures is a “meet in
the middle” approach. This involves generating many mathematical
expressions, computing their value for a limited number of iterations and
eliminating the expressions that give inaccurate results.*
Anyway, the formula for *e* they show in the article renders into J this
way:

   calcRamalikeE=: 13 : '(+`%)/,x:(3+i.y),.->:i.y'"0
   calcRamalikeE
([: +`%`:3 [: , [: x: (3 + i.) ,. [: - [: >: i.)"0
   calcRamalikeE 10 20
9864101r3628800 6613313319248080001r2432902008176640000
   >50j48":&.>calcRamalikeE 10 20
2.718281801146384479717813051146384479717813051146
2.718281828459045235339784490666415886146403434540

All fine and good but when I tried to replicate this from memory at home
tonight, I kept getting a "spelling error" on the "(+`%)" part.  Eventually
I figured out that what I'm typing in is rendering in Unicode and is
failing a spelling test.  I'm running J64 8.07, Library 8.07.26, and, as
always, under Emacs on Windows.

I'm afraid it may just be an Emacs thing as I had saved the problematic
session as "raw-text" earlier but I'd be pleased to hear from anyone who
could replicate or explain this or, even better, make sure it never happens
to anyone else ever again.

Thanks,

Devon

-- 

Devon McCormick, CFA

Quantitative Consultant
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to