<?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.13 $ --> <refentry xml:id="function.log" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>log</refname> <refpurpose>Natural logarithm</refpurpose> </refnamediv> <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>float</type><methodname>log</methodname> <methodparam><type>float</type><parameter>arg</parameter></methodparam> <methodparam choice="opt"><type>float</type><parameter>base</parameter></methodparam> </methodsynopsis> <para> If the optional <parameter>base</parameter> parameter is specified, <function>log</function> returns log<subscript>base</subscript> <parameter>arg</parameter>, otherwise <function>log</function> returns the natural logarithm of <parameter>arg</parameter>. </para> </refsect1> <refsect1 role="parameters"> &reftitle.parameters; <para> <variablelist> <varlistentry> <term><parameter>arg</parameter></term> <listitem> <para> The value to calculate the logarithm for </para> </listitem> </varlistentry> <varlistentry> <term><parameter>base</parameter></term> <listitem> <para> The optinal logarithmic base to use (defaults to 'e' and so to the natural logarithm). </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> The logarithm of <parameter>arg</parameter> to <parameter>base</parameter>, if given, or the natural logarithm. </para> </refsect1> <refsect1 role="changelog"> &reftitle.changelog; <para> <informaltable> <tgroup cols="2"> <thead> <row> <entry>&Version;</entry> <entry>&Description;</entry> </row> </thead> <tbody> <row> <entry>Since 4.3.0</entry> <entry> The optinal parameter <parameter>base</parameter> became available. For older versions you can calculate the logarithm in base <literal>b</literal> of a number <literal>n</literal>, but using the mathematical identity: log<subscript>b</subscript>(n) = log(n)/log(b), where log is the neperian (or natural) logarithm. </entry> </row> </tbody> </tgroup> </informaltable> </para> </refsect1> <refsect1 role="seealso"> &reftitle.seealso; <para> <simplelist> <member><function>log10</function></member> <member><function>exp</function></member> <member><function>pow</function></member> </simplelist> </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->