-
Notifications
You must be signed in to change notification settings - Fork 29
/
abs.xml
72 lines (57 loc) · 2.3 KB
/
abs.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<refentry id="abs">
<indexterm id="IndexAbs"><primary>abs</primary></indexterm>
<refentryinfo><title>Mathematical Operations:Mathematical Functions</title></refentryinfo>
<refmeta>
<refentrytitle>abs</refentrytitle>
</refmeta>
<refnamediv>
<refname>abs</refname>
<refpurpose>
Returns an absolute value.
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<para>
Returns the absolute value of <emphasis>x</emphasis>.
</para>
</refsect1>
<refsect1>
<title>Syntax</title>
<synopsis><command>abs</command>(x) (no rate
restriction)</synopsis>
<synopsis><command>abs</command>(k/i[]) (k- or i-arrays )</synopsis>
<para>
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.
</para>
</refsect1>
<refsect1>
<title>Examples</title>
<para>
Here is an example of the abs opcode. It uses the file <ulink url="examples/abs.csd"><citetitle>abs.csd</citetitle></ulink>.
<example>
<title>Example of the abs opcode.</title>
<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>
<xi:include href="examples-xml/abs.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
</example>
Its output should include lines like:
<screen>
instr 1: iabs = 0.000
instr 1: iabs = 0.150
instr 1: iabs = 13.000
</screen>
</para>
</refsect1>
<refsect1>
<title>See Also</title>
<para>
<link linkend="exp"><citetitle>exp</citetitle></link>,
<link linkend="frac"><citetitle>frac</citetitle></link>,
<link linkend="int"><citetitle>int</citetitle></link>,
<link linkend="log"><citetitle>log</citetitle></link>,
<link linkend="log10"><citetitle>log10</citetitle></link>,
<link linkend="opi"><citetitle>i</citetitle></link>,
<link linkend="sqrt"><citetitle>sqrt</citetitle></link>
</para>
</refsect1>
</refentry>