Template:PartialQuotientCalculator-Start

Use this template to start a table for calculating the partial quotients of the continued fraction of an irrational square root.

It is called by:
 *  

Note that all this template does is evaluate $\left\lfloor{\sqrt n}\right\rfloor$ and pass this and $n$ as parameters to the call to Template:PartialQuotientTable-Start.

The reason for this two-stage process is that you cannot use the  #expr  function within math delimiters, and you appear not to be able to use temporary variables within the context of a Template. Hence when using this technique, all the fields needed to be presented in the actual table are pre-calculated in this template and then passed into a second template, which is designed never to be actually called directly.

Subsequent rows of this table are added by calls to Template:PartialQuotientCalculator.

The table is completed by adding  |}  to the page on which this template is invoked.

For an example of its use, see Continued Fraction Expansion of Irrational Square Root/Example/13.