<term><function>deccvdbl</function></term>
<listitem>
<para>
Convert a value of type double to a value of type decimal.
<synopsis>
int deccvdbl(double dbl, decimal *np);
</synopsis>
The function receives the variable of type double that should be
converted as its first argument (<literal>dbl</literal>). As the second
argument (<literal>np</literal>), the function receives a pointer to the
decimal variable that should hold the result of the operation.
</para>
<para>
The function returns 0 on success and a negative value if the
conversion failed.
</para>
</listitem>
</varlistentry>
<varlistentry id="ecpg-informix-functions-deccvint">
<term><function>deccvint</function></term>
<listitem>
<para>
Convert a value of type int to a value of type decimal.
<synopsis>
int deccvint(int in, decimal *np);
</synopsis>
The function receives the variable of type int that should be
converted as its first argument (<literal>in</literal>). As the second
argument (<literal>np</literal>), the function receives a pointer to the
decimal variable that should hold the result of the operation.
</para>
<para>
The function returns 0 on success and a negative value if the
conversion failed.
</para>
</listitem>
</varlistentry>
<varlistentry id="ecpg-informix-functions-deccvlong">
<term><function>deccvlong</function></term>
<listitem>
<para>
Convert a value of type long to a value of type decimal.
<synopsis>
int deccvlong(long lng, decimal *np);
</synopsis>
The function receives the variable of type long that should be
converted as its first argument (<literal>lng</literal>). As the second
argument (<literal>np</literal>), the function receives a pointer to the
decimal variable that should hold the result of the operation.
</para>
<para>
The function returns 0 on success and a negative value if the
conversion failed.
</para>
</listitem>
</varlistentry>
<varlistentry id="ecpg-informix-functions-decdiv">
<term><function>decdiv</function></term>
<listitem>
<para>
Divide two variables of type decimal.
<synopsis>
int decdiv(decimal *n1, decimal *n2, decimal *result);
</synopsis>
The function receives pointers to the variables that are the first
(<literal>n1</literal>) and the second (<literal>n2</literal>) operands and
calculates <literal>n1</literal>/<literal>n2</literal>. <literal>result</literal> is a
pointer to the variable that should hold the result of the operation.
</para>
<para>
On success, 0 is returned and a negative value if the division fails.
If overflow or underflow occurred, the function returns
<literal>ECPG_INFORMIX_NUM_OVERFLOW</literal> or
<literal>ECPG_INFORMIX_NUM_UNDERFLOW</literal> respectively. If an attempt to
divide by zero is observed, the function returns
<literal>ECPG_INFORMIX_DIVIDE_ZERO</literal>.
</para>
</listitem>
</varlistentry>
<varlistentry id="ecpg-informix-functions-decmul">
<term><function>decmul</function></term>
<listitem>
<para>
Multiply two decimal values.
<synopsis>
int decmul(decimal *n1, decimal *n2, decimal *result);
</synopsis>
The function receives pointers to the variables that are the first
(<literal>n1</literal>) and the second (<literal>n2</literal>) operands and
calculates <literal>n1</literal>*<literal>n2</literal>. <literal>result</literal> is a
pointer to the variable that should hold the result of the operation.
</para>
<para>
On success, 0 is returned and a negative value if the multiplication
fails. If overflow or underflow occurred, the function