Debian Codegraph @

opcodes/log.xml

raw symbols SCIP
1
2 <refentry id="log">
3 <indexterm id="IndexLog"><primary>log</primary></indexterm>
4 <refentryinfo><title>Mathematical Operations:Mathematical Functions</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>log</refentrytitle>
7 </refmeta>
8
9 <refnamediv>
10 <refname>log</refname>
11
12 <refpurpose>
13 Returns a natural log of a number, or an array (with optional arbitrary base).
14
15 </refpurpose>
16 </refnamediv>
17
18 <refsect1>
19 <title>Description</title>
20 <para>
21 Returns the natural log of <emphasis>x</emphasis> (<emphasis>x</emphasis> positive only). In
22 the case of an array input, the operation can have an optional arbitrary base.
23 </para>
24
25 <para>
26 The argument value is restricted for <emphasis>log</emphasis>,
27 <link linkend="log10"><citetitle>log10</citetitle></link>,
28 and <link linkend="sqrt"><citetitle>sqrt</citetitle></link>.
29 </para>
30 </refsect1>
31
32 <refsect1>
33 <title>Syntax</title>
34 <synopsis><command>log</command>(x) (no rate
35 restriction)</synopsis>
36 <synopsis><command>log</command>(k/i[]) (k- or i-arrays )</synopsis>
37 <synopsis>kout[]<command>log</command> kin[],ibas</synopsis>
38 <para>
39 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. In the case of an array input, ibas is the optional arbitrary base, which defaults to e (natural log base).
40 </para>
41 </refsect1>
42
43 <refsect1>
44 <title>Examples</title>
45 <para>
46 Here is an example of the log opcode. It uses the file <ulink url="examples/log.csd"><citetitle>log.csd</citetitle></ulink>.
47
48 <example>
49 <title>Example of the log opcode.</title>
50
51 <para>See the sections <link linkend="UsingRealTime"><citetitle>Real-time Audio</citetitle></link> and <link linkend="CommandFlags"><citetitle>Command Line Flags</citetitle></link> for more information on using command line flags.</para>
52 <xi:include href="examples-xml/log.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
53 </example>
54
55 Its output should include a line like this:
56 <screen>instr 1: i1 = 2.079</screen>
57 </para>
58 </refsect1>
59
60 <refsect1>
61 <title>See also</title>
62 <para><link linkend="MathMatfunc"><citetitle>Mathematical Functions</citetitle></link></para>
63 </refsect1>
64
65 <refsect1>
66 <title>Credits</title>
67 <para>Written by &namejohn;.</para>
68 <para>New in version 3.47</para>
69 <para>Example written by &namekevin;.</para>
70 </refsect1>
71 </refentry>