Template:Euclidean algorithm steps/line: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 1:
<includeonly>
{{Calculator-hideifzero|formula=stepifgreaterorequal(curstep,{{#expr:{{{n}}}*2}},1,0)|starthidden=1|1={{#ifeq:{{{n}}}|0||<hr>}}{{calculator|formula=r{{{n}}}|type=plain}} = q<sub>{{{n}}}</sub> × {{calculator|formula=r{{#expr:{{{n}}}+1}}|type=plain}} + r<sub>{{{n}}}</sub><br>}}
{{Calculator-hideifzero|formula=stepifgreaterorequal(curstep,{{#expr:{{{n}}}*2+1}},1,0)|starthidden=1|1=q<sub>{{{n}}}</sub> = {{calculator|formula=floor(r{{{n}}}/r{{#expr:{{{n}}}+1}})|id=q{{#expr:{{{n}}}+2}}|type=plain}} ; r<sub>{{{n}}}</sub> = {{calculator|formula=r{{{n}}}%r{{#expr:{{{n}}}+1}}|id=r{{#expr:{{{n}}}+2}}|type=plain}}}}
 
{{Calculator-hideifzero|formula=or(step{{#expr:{{{n}}}*2}},step{{#expr:{{{n}}}*2+1}})|starthidden=1|1={{calculator label|style=cursor:pointer|class=cdx-button cdx-button--action-destructive|for=start|1=Restart}}}}{{Calculator-hideifzero|formula=step{{#expr:{{{n}}}*2}}|starthidden=1|1={{calculator label|style=cursor:pointer|class=cdx-button cdx-button--action-progressive|for=step{{#expr:{{{n}}}*2+1}}|1=Next &rarr;}}}}{{Calculator-hideifzero|formula=step{{#expr:{{{n}}}*2+1}}|starthidden=1|1={{calculator label|style=cursor:pointer|class=cdx-button cdx-button--action-progressive|for=step{{#expr:{{{n}}}*2+2}}|1=Next &rarr;}}}}</includeonly>