<primary>gamma</primary>
</indexterm>
<function>gamma</function> ( <type>double precision</type> )
<returnvalue>double precision</returnvalue>
</para>
<para>
Gamma function
</para>
<para>
<literal>gamma(0.5)</literal>
<returnvalue>1.772453850905516</returnvalue>
</para>
<para>
<literal>gamma(6)</literal>
<returnvalue>120</returnvalue>
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<indexterm>
<primary>gcd</primary>
</indexterm>
<function>gcd</function> ( <replaceable>numeric_type</replaceable>, <replaceable>numeric_type</replaceable> )
<returnvalue><replaceable>numeric_type</replaceable></returnvalue>
</para>
<para>
Greatest common divisor (the largest positive number that divides both
inputs with no remainder); returns <literal>0</literal> if both inputs
are zero; available for <type>integer</type>, <type>bigint</type>,
and <type>numeric</type>
</para>
<para>
<literal>gcd(1071, 462)</literal>
<returnvalue>21</returnvalue>
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<indexterm>
<primary>lcm</primary>
</indexterm>
<function>lcm</function> ( <replaceable>numeric_type</replaceable>, <replaceable>numeric_type</replaceable> )
<returnvalue><replaceable>numeric_type</replaceable></returnvalue>
</para>
<para>
Least common multiple (the smallest strictly positive number that is
an integral multiple of both inputs); returns <literal>0</literal> if
either input is zero; available for <type>integer</type>,
<type>bigint</type>, and <type>numeric</type>
</para>
<para>
<literal>lcm(1071, 462)</literal>
<returnvalue>23562</returnvalue>
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<indexterm>
<primary>lgamma</primary>
</indexterm>
<function>lgamma</function> ( <type>double precision</type> )
<returnvalue>double precision</returnvalue>
</para>
<para>
Natural logarithm of the absolute value of the gamma function
</para>
<para>
<literal>lgamma(1000)</literal>
<returnvalue>5905.220423209181</returnvalue>
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<indexterm>
<primary>ln</primary>
</indexterm>
<function>ln</function> ( <type>numeric</type> )
<returnvalue>numeric</returnvalue>
</para>
<para role="func_signature">
<function>ln</function> ( <type>double precision</type> )
<returnvalue>double precision</returnvalue>
</para>
<para>
Natural logarithm
</para>
<para>
<literal>ln(2.0)</literal>
<returnvalue>0.6931471805599453</returnvalue>
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<indexterm>
<primary>log</primary>
</indexterm>
<function>log</function> ( <type>numeric</type> )
<returnvalue>numeric</returnvalue>
</para>
<para role="func_signature">
<function>log</function> ( <type>double precision</type> )
<returnvalue>double precision</returnvalue>
</para>
<para>
Base 10 logarithm
</para>
<para>
<literal>log(100)</literal>
<returnvalue>2</returnvalue>
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<indexterm>
<primary>log10</primary>
</indexterm>