Debian Codegraph @

opcodes/floor.xml

raw symbols SCIP
1
2 <refentry id="floor">
3 <indexterm id="IndexFloor"><primary>floor</primary></indexterm>
4 <refentryinfo><title>Mathematical Operations:Mathematical Functions</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>floor</refentrytitle>
7 </refmeta>
8
9
10
11 <refnamediv>
12 <refname>floor</refname>
13
14 <refpurpose>
15 Returns the largest integer not greater than <emphasis>x</emphasis>
16 </refpurpose>
17 </refnamediv>
18
19 <refsect1>
20 <title>Description</title>
21 <para>
22 Returns the largest integer not greater than <emphasis>x</emphasis>
23 </para>
24 </refsect1>
25
26 <refsect1>
27 <title>Syntax</title>
28 <synopsis><command>floor</command>(x) (init-, control-, or audio-rate arg allowed)</synopsis>
29 <synopsis><command>floor</command>(k/i[]) (k- or i-arrays )</synopsis>
30 <para>
31 where the argument within the parentheses may be an expression.
32 Value converters perform arithmetic translation from units of
33 one kind to units of another. The result can then be a term in a
34 further expression.
35 </para>
36 </refsect1>
37
38 <refsect1>
39 <title>Examples</title>
40 <para>
41 Here is an example of the floor opcode. It uses the file <ulink url="examples/floor.csd"><citetitle>floor.csd</citetitle></ulink>.
42 <example>
43 <title>Example of the floor opcode.</title>
44 <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>
45 <xi:include href="examples-xml/floor.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
46 </example>
47 </para>
48 </refsect1>
49
50 <refsect1>
51 <para>
52 The output should include lines like these:
53 <screen>
54 instr 1: inumber = 9.000 idiv = 1.000 ifl = 9.000
55 instr 1: inumber = 9.000 idiv = 2.000 ifl = 4.000
56 instr 1: inumber = 9.000 idiv = 3.000 ifl = 3.000
57 instr 1: inumber = 9.000 idiv = 4.000 ifl = 2.000
58 instr 1: inumber = 9.000 idiv = 5.000 ifl = 1.000
59 instr 1: inumber = 9.000 idiv = 6.000 ifl = 1.000
60 instr 1: inumber = 9.000 idiv = 7.000 ifl = 1.000
61 instr 1: inumber = 9.000 idiv = 8.000 ifl = 1.000
62 instr 1: inumber = 9.000 idiv = 9.000 ifl = 1.000
63 instr 1: inumber = 9.000 idiv = 10.000 ifl = 0.000
64 </screen>
65 <para>
66 Here is another example of the floor opcode. It uses the file <ulink url="examples/floor2.csd"><citetitle>floor2.csd</citetitle></ulink>.
67 <example>
68 <xi:include href="examples-xml/floor2.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
69 </example>
70 </para>
71 Here is an example for the rounding-group, comparing the different rounding opcodes. It uses the file <ulink url="examples/rounding-group.csd"><citetitle>rounding-group.csd</citetitle></ulink>.
72 <example>
73 <title>Example of the rounding group.</title>
74 <xi:include href="examples-xml/rounding-group.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
75 </example>
76 </para>
77 </refsect1>
78
79 <refsect1>
80 <title>See also</title>
81 <para><link linkend="MathMatfunc"><citetitle>Mathematical Functions</citetitle></link></para>
82 </refsect1>
83
84 <refsect1>
85 <title>Credits</title>
86 <para>
87 <simplelist>
88 <member>Author: Istvan Varga</member>
89 <member>New in Csound 5</member>
90 <member>2005</member>
91 </simplelist>
92 </para>
93 </refsect1>
94 </refentry>