Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Immediately implements the Antihydra in Fractran

13122 -> 50/18, 55/42, 539/2, 297/275, 2/55, 2/11





This is cool, could you please explain your implementation?

For sure, here are the registers used for each fraction:

  comp h^2 > comp H^2
  comp h c > done H
  comp     > done c^2
  done H^2 > done h^3
  done H   > comp
  done     > comp

  Accumulator: comp h^8
The first two does the comparison for odd/even, the h register is moved to the H register during the comparison, then done does H += H>>2, and then keep trying.

https://wiki.xxiivv.com/site/fractran.html


Thank you very much - great link too!

50/18 reduces to 25/9 right?

And 297/275 to 27/25?



Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: