Greedy algorithm for Egyptian fractions: Difference between revisions

m
tinker with formula rendering
(→‎{{header|Perl 6}}: surperfluous but operator)
m (tinker with formula rendering)
Line 5:
Fibonacci's [[wp:Greedy algorithm for Egyptian fractions|Greedy algorithm for Egyptian fractions]] expands the fraction <math> \tfrac{x}{y} </math> to be represented by repeatedly performing the replacement
 
: <math> \frac{x}{y} = \frac{1}{\lceil y/x\rceil} + \frac{(-y)\!\!\!\!\mod x}{y\lceil y/x\rceil} </math>
 
(simplifying the 2<sup>nd</sup> term in this replacement as necessary, and where <math> \lceil x \rceil </math> is the ''ceiling'' function).
Anonymous user