Tacit programming: Difference between revisions

Jump to navigation Jump to search
No edit summary
Line 61: Line 61:
</source>
</source>


=== Top-heavy fraction as decimal ===
=== Fractions ===
We can convert decimal numbers to fractions. For example, we can convert <math>2.625</math> to the improper fraction <math>21\over 8</math> with
<source lang=apl>
<source lang=apl>
       (1∧⊢,÷) 1.125
       (1∧⊢,÷)2.625
9 8
21 8
</source>
Alternatively, we can convert it to the mixed fraction <math>2{5\over 8}</math> with
A mixed fraction:
<source lang=apl>
      (1∧0 1∘⊤,÷)2.625
2 5 8
</source>
</source>