Debian Codegraph @

opcodes/pow.xml

raw symbols SCIP
1
2 <refentry id="pow">
3 <indexterm id="IndexPow"><primary>pow</primary></indexterm>
4 <refentryinfo><title>Mathematical Operations:Opcode Equivalents of Functions</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>pow</refentrytitle>
7 </refmeta>
8
9
10
11 <refnamediv>
12 <refname>pow</refname>
13
14 <refpurpose>
15 Computes one argument to the power of another argument.
16 </refpurpose>
17 </refnamediv>
18
19 <refsect1>
20 <title>Description</title>
21 <para>
22 Computes <emphasis>xarg</emphasis> to the power of <emphasis>kpow</emphasis> (or <emphasis>ipow</emphasis>) and scales the result by <emphasis>inorm</emphasis>.
23 </para>
24
25 <para>
26 </para>
27 </refsect1>
28
29 <refsect1>
30 <title>Syntax</title>
31 <synopsis>ares <command>pow</command> aarg, kpow [, inorm]</synopsis>
32
33 <synopsis>ires <command>pow</command> iarg, ipow [, inorm]</synopsis>
34
35 <synopsis>kres <command>pow</command> karg, kpow [, inorm]</synopsis>
36
37 <synopsis>ires[] <command>pow</command> iarg[], ipow[] </synopsis>
38
39 <synopsis>kres[] <command>pow</command> karg[], kpow[]</synopsis>
40
41 <synopsis>ires[] <command>pow</command> iarg[], ipow </synopsis>
42
43 <synopsis>kres[] <command>pow</command> karg[], kpow </synopsis>
44
45 </refsect1>
46
47 <refsect1>
48 <title>Initialization</title>
49 <para>
50 <emphasis>inorm</emphasis> (optional, default=1) -- The number to divide the result (default to 1). This is especially useful if you are doing powers of a- or k- signals where samples out of range are extremely common!
51 </para>
52 </refsect1>
53
54 <refsect1>
55 <title>Performance</title>
56 <para>
57 <emphasis>aarg</emphasis>, <emphasis>iarg</emphasis>, <emphasis>karg</emphasis> -- the base.
58 </para>
59
60 <para>
61 <emphasis>ipow</emphasis>, <emphasis>kpow</emphasis> -- the exponent.
62 </para>
63
64 <note>
65 <para>
66 Use <emphasis>&circ;</emphasis> with caution in arithmetical statements, as the precedence may not be correct. New in Csound version 3.493.
67 </para>
68 </note>
69 </refsect1>
70
71 <refsect1>
72 <title>Examples</title>
73 <para>
74 Here is an example of the pow opcode. It uses the file <ulink url="examples/pow.csd"><citetitle>pow.csd</citetitle></ulink>.
75 <example>
76 <title>Example of the pow opcode.</title>
77 <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>
78 <xi:include href="examples-xml/pow.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
79 </example>
80 Its output should include lines like these:
81 <screen>
82 i1 0.50000
83 i1 0.50007
84 i1 0.50014
85 .......
86 i1 14.45986
87 i1 14.46130
88 </screen>
89 </para>
90 </refsect1>
91
92 <refsect1>
93 <title>See also</title>
94 <para><link linkend="MathMatfunc"><citetitle>Mathematical Functions</citetitle></link></para>
95 <para><link linkend="MathOpeqfunc"><citetitle>Opcode Equivalents of Functions</citetitle></link></para>
96 </refsect1>
97
98 <refsect1>
99 <title>Credits</title>
100 <para>
101 <simplelist>
102 <member>Author: &nameparis;</member>
103 <member>MIT, Cambridge</member>
104 <member>1995</member>
105 </simplelist>
106 </para>
107 </refsect1>
108 </refentry>