Template:Euclidean algorithm steps/line: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 1:
<includeonly>
<includeonly>{{calculator|formula=r{{{n}}}|type=plain}} = q<sub>{{{n}}}</sub> × {{calculator|formula=r{{#expr:{{{n}}}+1}}|type=plain}} + r<sub>{{{n}}}</sub><br>
q<sub>{{{n}}}</sub> = {{calculatorCalculator-hideifzero|formula=floor(r{{{n}}}/rstep{{#expr:{{{n}}}+1*2}})|id=q<hr>{{#expr:calculator|formula=r{{{n}}}+2}}|type=plain}} ;= rq<sub>{{{n}}}</sub> =× {{calculator|formula=r{{{n}}}%r{{#expr:{{{n}}}+1}}|idtype=plain}} + r{{#expr:<sub>{{{n}}}+2}}|type=plain}}</includeonlysub><br>}}
{{Calculator-hideifzero|formula=step{{#expr:{{{n}}}*2+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}})|{{calculator label|style=cursor:pointer|class=cdx-button|for=start|1=Reset}}}}{{Calculator-hideifzero|formula=step{{#expr:{{{n}}}*2}}|{{calculator label|style=cursor:pointer|class=cdx-button|for=step{{#expr:{{{n}}}*2+1}}|1=Next &larr;}}}}{{Calculator-hideifzero|formula=step{{#expr:{{{n}}}*2+1}}|{{calculator label|style=cursor:pointer|class=cdx-button|for=step{{#expr:{{{n}}}*2+2}}|1=Next &larr;}}}}</includeonly>