⍝ Egyptian fractions:

    9 efract 10                         ⍝ Egyptian fraction rep of 9÷10.
2 3 15

    rational +/÷ 9 efract 10            ⍝ round-trip to check.
9 10

    rational +/÷ 355 efract 452         ⍝ coarse approximation to ○÷4.
355 452

    2 3 5 7 ∘.efract 11 13 17 19
┌──────┬─────────┬─────────┬─────────┐
│6 66  │7 91     │9 153    │10 190   │
├──────┼─────────┼─────────┼─────────┤
│4 44  │5 33 2145│6 102    │7 67 8911│
├──────┼─────────┼─────────┼─────────┤
│3 9 99│3 20 780 │4 23 1564│4 76     │
├──────┼─────────┼─────────┼─────────┤
│2 8 88│2 26     │3 13 663 │3 29 1653│
└──────┴─────────┴─────────┴─────────┘

Back to: code

Back to: Workspaces