blob: 6246f506064cdcf19afad9646df0a388d2b49e09 (
plain)
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
73
74
75
76
|
<refentry id="sqrt">
<indexterm id="IndexSqrt"><primary>sqrt</primary></indexterm>
<refentryinfo><title>Mathematical Operations:Mathematical Functions</title></refentryinfo>
<refmeta>
<refentrytitle>sqrt</refentrytitle>
</refmeta>
<refnamediv>
<refname>sqrt</refname>
<refpurpose>
Returns a square root value.
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<para>
Returns the square root of <emphasis>x</emphasis> (<emphasis>x</emphasis> non-negative).
</para>
<para>
The argument value is restricted for <link linkend="log"><citetitle>log</citetitle></link>,
<link linkend="log10"><citetitle>log10</citetitle></link>, and <emphasis>sqrt</emphasis>.
</para>
</refsect1>
<refsect1>
<title>Syntax</title>
<synopsis><command>sqrt</command>(x) (no rate restriction)</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 sqrt opcode. It uses the file <ulink url="examples/sqrt.csd"><citetitle>sqrt.csd</citetitle></ulink>.
<example>
<title>Example of the sqrt 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/sqrt.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
</example>
Its output should include lines like this:
<screen>instr 1: i1 = 8.000</screen>
</para>
</refsect1>
<refsect1>
<title>See Also</title>
<para>
<link linkend="abs"><citetitle>abs</citetitle></link>,
<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>
</para>
</refsect1>
<refsect1>
<title>Credits</title>
<para>Example written by &namekevin;.</para>
</refsect1>
</refentry>
|