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

    <refpurpose>
      Returns the fractional part of a decimal number.
      <indexterm id="IndexFrac"><primary>frac</primary></indexterm>
    </refpurpose>
  </refnamediv>
 
  <refsect1>
    <title>Description</title>
    <para>
      Returns the fractional part of <emphasis>x</emphasis>.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Syntax</title>
    <synopsis><command>frac</command>(x) (init-rate or control-rate args only)</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 frac opcode. It uses the files <ulink url="examples/frac.orc"><citetitle>frac.orc</citetitle></ulink> and <ulink url="examples/frac.sco"><citetitle>frac.sco</citetitle></ulink>.

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

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

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

      Its output should include a line like this:
      <screen>
instr 1:  i2 = 0.200
      </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="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>,
      <link linkend="sqrt"><citetitle>sqrt</citetitle></link>
    </para>
  </refsect1>

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