1
0
www.mikescher.com/www/statics/euler/Euler_Problem-044_explanation.md

8 lines
815 B
Markdown
Raw Permalink Normal View History

2017-11-08 17:39:50 +01:00
My first attempt at this problem took over 5 hours to compute and had a complexity of O(n^3).
The problem is that you need a square root to inverse the pentagonal formula and Befunge has no square root function.
2018-02-03 16:50:58 +01:00
So I needed to implement my own version of integer square roots in Befunge (see [wikipedia](https://en.wikipedia.org/wiki/Methods_of_computing_square_roots)).
2017-11-08 17:39:50 +01:00
The program is still not really fast but it's good that I managed to speed it up to a time where you can execute it without waiting the whole night.
2018-02-03 18:49:23 +01:00
Also this program is nicely compact, by the time I'm writing this my Befunge interpreter [BefunExec](https://www.mikescher.com/programs/view/BefunUtils) has gotten a display of all possible paths a program can take.
2017-11-08 17:39:50 +01:00
And if you look at the graph of this program, it looks pretty interesting...