<!-- Converted to DocBook/SGML by Kevin Conder -->
<refentry id="sqrt">
  <refmeta>
    <refentrytitle>sqrt</refentrytitle>
  </refmeta>
 
  <refnamediv>
    <refname>sqrt</refname>

    <refpurpose>
      Returns a square root value.
      <indexterm id="IndexSqrt"><primary>sqrt</primary></indexterm>
    </refpurpose>
  </refnamediv>
 
  <refsect1>
    <title>Description</title>
    <para>
      Returns the square root of <emphasis>x</emphasis> (<emphasis>x</emphasis> non-negative).
    </para>

    <para>
      The argument value is restricted for <emphasis>log</emphasis>, <emphasis>log10</emphasis>, and <emphasis>sqrt</emphasis>.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Syntax</title>
    <synopsis><command>sqrt</command>(x) (no rate restriction)</synopsis>

    <para>
      where the argument within the parentheses may be an expression. Value converters perform arithmetic translation from units of one kind to units of another. The result can then be a term in a further expression.
    </para>
  </refsect1>

  <refsect1>
    <title>Examples</title>
    <para>
      Here is an example of the sqrt opcode. It uses the files <ulink url="examples/sqrt.orc"><citetitle>sqrt.orc</citetitle></ulink> and <ulink url="examples/sqrt.sco"><citetitle>sqrt.sco</citetitle></ulink>.

      <example>
        <title>Example of the sqrt opcode.</title>

        <programlisting>
<inlinemediaobject>
            <imageobject>
              <imagedata fileref="examples/sqrt.orc" format="linespecific">
            </imageobject>
          </inlinemediaobject>
        </programlisting>

        <programlisting>
<inlinemediaobject>
            <imageobject>
              <imagedata fileref="examples/sqrt.sco" format="linespecific">
            </imageobject>
          </inlinemediaobject>
        </programlisting>
      </example>

      Its output should include lines like this:
      <screen>
instr 1:  i1 = 8.000
      </screen>
    </para>
  </refsect1>

  <refsect1>
    <title>See Also</title>
    <para>
      <link linkend="abs"><citetitle>abs</citetitle></link>,
      <link linkend="exp"><citetitle>exp</citetitle></link>,
      <link linkend="frac"><citetitle>frac</citetitle></link>,
      <link linkend="int"><citetitle>int</citetitle></link>,
      <link linkend="log"><citetitle>log</citetitle></link>,
      <link linkend="log10"><citetitle>log10</citetitle></link>,
      <link linkend="opi"><citetitle>i</citetitle></link>
    </para>
  </refsect1>

  <refsect1>
    <title>Credits</title>
    <para>Example written by &namekevin;.</para>
  </refsect1>
</refentry>
