1
<?xml version="1.0" encoding="UTF-8"?>
2
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
3
"http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd" [
4
<!ENTITY mathFunctionsInc SYSTEM "mathFunctionsInc.xml">
10
<keyword>remquo</keyword>
15
<refentrytitle>remquo</refentrytitle>
19
<year>2007-2011</year>
20
<holder>The Khronos Group Inc.
21
Permission is hereby granted, free of charge, to any person obtaining a
22
copy of this software and/or associated documentation files (the
23
"Materials"), to deal in the Materials without restriction, including
24
without limitation the rights to use, copy, modify, merge, publish,
25
distribute, sublicense, and/or sell copies of the Materials, and to
26
permit persons to whom the Materials are furnished to do so, subject to
27
the condition that this copyright notice and permission notice shall be included
28
in all copies or substantial portions of the Materials.</holder>
31
<manvolnum>3</manvolnum>
34
<!-- ================================ SYNOPSIS -->
36
<refnamediv id="remquo">
37
<refname>remquo</refname>
40
Floating point remainder and quotient function.
44
<refsynopsisdiv xmlns:xlink="http://www.w3.org/1999/xlink"><title></title>
48
<link xlink:href="vectorDataTypes.html">float<replaceable>n</replaceable></link>
55
<link xlink:href="vectorDataTypes.html">float<replaceable>n</replaceable></link>
56
<parameter>x</parameter>
60
<link xlink:href="vectorDataTypes.html">float<replaceable>n</replaceable></link>
61
<parameter>y</parameter>
65
<link xlink:href="global.html">__global</link>
66
<link xlink:href="vectorDataTypes.html">int<replaceable>n</replaceable></link>
67
<parameter>*quo</parameter>
75
<link xlink:href="vectorDataTypes.html">float<replaceable>n</replaceable></link>
82
<link xlink:href="vectorDataTypes.html">float<replaceable>n</replaceable></link>
83
<parameter>x</parameter>
87
<link xlink:href="vectorDataTypes.html">float<replaceable>n</replaceable></link>
88
<parameter>y</parameter>
92
<link xlink:href="local.html">__local</link>
93
<link xlink:href="vectorDataTypes.html">int<replaceable>n</replaceable></link>
94
<parameter>*quo</parameter>
102
<link xlink:href="vectorDataTypes.html">float<replaceable>n</replaceable></link>
109
<link xlink:href="vectorDataTypes.html">float<replaceable>n</replaceable></link>
110
<parameter>x</parameter>
114
<link xlink:href="vectorDataTypes.html">float<replaceable>n</replaceable></link>
115
<parameter>y</parameter>
119
<link xlink:href="private.html">__private</link>
120
<link xlink:href="vectorDataTypes.html">int<replaceable>n</replaceable></link>
121
<parameter>*quo</parameter>
129
<link xlink:href="scalarDataTypes.html">float</link>
136
<link xlink:href="scalarDataTypes.html">float</link>
137
<parameter>x</parameter>
141
<link xlink:href="scalarDataTypes.html">float</link>
142
<parameter>y</parameter>
146
<link xlink:href="global.html">__global</link>
147
<link xlink:href="scalarDataTypes.html">int</link>
148
<parameter>*quo</parameter>
156
<link xlink:href="scalarDataTypes.html">float</link>
163
<link xlink:href="scalarDataTypes.html">float</link>
164
<parameter>x</parameter>
168
<link xlink:href="scalarDataTypes.html">float</link>
169
<parameter>y</parameter>
173
<link xlink:href="local.html">__local</link>
174
<link xlink:href="scalarDataTypes.html">int</link>
175
<parameter>*quo</parameter>
183
<link xlink:href="scalarDataTypes.html">float</link>
190
<link xlink:href="scalarDataTypes.html">float</link>
191
<parameter>x</parameter>
195
<link xlink:href="scalarDataTypes.html">float</link>
196
<parameter>y</parameter>
200
<link xlink:href="private.html">__private</link>
201
<link xlink:href="scalarDataTypes.html">int</link>
202
<parameter>*quo</parameter>
210
<link xlink:href="vectorDataTypes.html">double<replaceable>n</replaceable></link>
217
<link xlink:href="vectorDataTypes.html">double<replaceable>n</replaceable></link>
218
<parameter>x</parameter>
222
<link xlink:href="vectorDataTypes.html">double<replaceable>n</replaceable></link>
223
<parameter>y</parameter>
227
<link xlink:href="global.html">__global</link>
228
<link xlink:href="vectorDataTypes.html">int<replaceable>n</replaceable></link>
229
<parameter>*quo</parameter>
237
<link xlink:href="vectorDataTypes.html">double<replaceable>n</replaceable></link>
244
<link xlink:href="vectorDataTypes.html">double<replaceable>n</replaceable></link>
245
<parameter>x</parameter>
249
<link xlink:href="vectorDataTypes.html">double<replaceable>n</replaceable></link>
250
<parameter>y</parameter>
254
<link xlink:href="local.html">__local</link>
255
<link xlink:href="vectorDataTypes.html">int<replaceable>n</replaceable></link>
256
<parameter>*quo</parameter>
264
<link xlink:href="vectorDataTypes.html">double<replaceable>n</replaceable></link>
271
<link xlink:href="vectorDataTypes.html">double<replaceable>n</replaceable></link>
272
<parameter>x</parameter>
276
<link xlink:href="vectorDataTypes.html">double<replaceable>n</replaceable></link>
277
<parameter>y</parameter>
281
<link xlink:href="private.html">__private</link>
282
<link xlink:href="vectorDataTypes.html">int<replaceable>n</replaceable></link>
283
<parameter>*quo</parameter>
291
<link xlink:href="scalarDataTypes.html">double</link>
298
<link xlink:href="scalarDataTypes.html">double</link>
299
<parameter>x</parameter>
303
<link xlink:href="scalarDataTypes.html">double</link>
304
<parameter>y</parameter>
308
<link xlink:href="global.html">__global</link>
309
<link xlink:href="scalarDataTypes.html">int</link>
310
<parameter>*quo</parameter>
318
<link xlink:href="scalarDataTypes.html">double</link>
325
<link xlink:href="scalarDataTypes.html">double</link>
326
<parameter>x</parameter>
330
<link xlink:href="scalarDataTypes.html">double</link>
331
<parameter>y</parameter>
335
<link xlink:href="local.html">__local</link>
336
<link xlink:href="scalarDataTypes.html">int</link>
337
<parameter>*quo</parameter>
345
<link xlink:href="scalarDataTypes.html">double</link>
352
<link xlink:href="scalarDataTypes.html">double</link>
353
<parameter>x</parameter>
357
<link xlink:href="scalarDataTypes.html">double</link>
358
<parameter>y</parameter>
362
<link xlink:href="private.html">__private</link>
363
<link xlink:href="scalarDataTypes.html">int</link>
364
<parameter>*quo</parameter>
372
<link xlink:href="vectorDataTypes.html">half<replaceable>n</replaceable></link>
379
<link xlink:href="vectorDataTypes.html">half<replaceable>n</replaceable></link>
380
<parameter>x</parameter>
384
<link xlink:href="vectorDataTypes.html">half<replaceable>n</replaceable></link>
385
<parameter>y</parameter>
389
<link xlink:href="global.html">__global</link>
390
<link xlink:href="vectorDataTypes.html">int<replaceable>n</replaceable></link>
391
<parameter>*quo</parameter>
399
<link xlink:href="vectorDataTypes.html">half<replaceable>n</replaceable></link>
406
<link xlink:href="vectorDataTypes.html">half<replaceable>n</replaceable></link>
407
<parameter>x</parameter>
411
<link xlink:href="vectorDataTypes.html">half<replaceable>n</replaceable></link>
412
<parameter>y</parameter>
416
<link xlink:href="local.html">__local</link>
417
<link xlink:href="vectorDataTypes.html">int<replaceable>n</replaceable></link>
418
<parameter>*quo</parameter>
426
<link xlink:href="vectorDataTypes.html">half<replaceable>n</replaceable></link>
433
<link xlink:href="vectorDataTypes.html">half<replaceable>n</replaceable></link>
434
<parameter>x</parameter>
438
<link xlink:href="vectorDataTypes.html">half<replaceable>n</replaceable></link>
439
<parameter>y</parameter>
443
<link xlink:href="private.html">__private</link>
444
<link xlink:href="vectorDataTypes.html">int<replaceable>n</replaceable></link>
445
<parameter>*quo</parameter>
453
<link xlink:href="scalarDataTypes.html">half</link>
460
<link xlink:href="scalarDataTypes.html">half</link>
461
<parameter>x</parameter>
465
<link xlink:href="scalarDataTypes.html">half</link>
466
<parameter>y</parameter>
470
<link xlink:href="global.html">__global</link>
471
<link xlink:href="scalarDataTypes.html">int</link>
472
<parameter>*quo</parameter>
480
<link xlink:href="scalarDataTypes.html">half</link>
487
<link xlink:href="scalarDataTypes.html">half</link>
488
<parameter>x</parameter>
492
<link xlink:href="scalarDataTypes.html">half</link>
493
<parameter>y</parameter>
497
<link xlink:href="local.html">__local</link>
498
<link xlink:href="scalarDataTypes.html">int</link>
499
<parameter>*quo</parameter>
507
<link xlink:href="scalarDataTypes.html">half</link>
514
<link xlink:href="scalarDataTypes.html">half</link>
515
<parameter>x</parameter>
519
<link xlink:href="scalarDataTypes.html">half</link>
520
<parameter>y</parameter>
524
<link xlink:href="private.html">__private</link>
525
<link xlink:href="scalarDataTypes.html">int</link>
526
<parameter>*quo</parameter>
533
<!-- ================================ DESCRIPTION -->
535
<refsect1 id="description"><title>Description</title>
537
The <function>remquo</function> function computes the value
538
<varname>r</varname> such that <varname>r</varname> = <varname>x</varname>
539
- <varname>n</varname>*<varname>y</varname>, where <varname>k</varname> is the
540
integer nearest the exact value of <varname>x</varname>/<varname>y</varname>. If
541
there are two integers closest to <varname>x</varname>/<varname>y</varname>,
542
<varname>k</varname> shall be the even one. If <varname>r</varname> is zero, it is
543
given the same sign as <varname>x</varname>. This is the same value that is returned
544
by the <citerefentry><refentrytitle>remainder</refentrytitle></citerefentry> function.
548
<function>remquo</function> also calculates the lower seven bits of the integral
549
quotient <varname>x</varname>/<varname>y</varname>, and gives that value the same
550
sign as <varname>x</varname>/<varname>y</varname>. It stores this signed value in
551
the object pointed to by <varname>quo</varname>.
555
<!-- ================================ NOTES -->
557
<refsect1 id="notes"><title>Notes</title>
563
<!-- ================================ EXAMPLE -->
564
<!-- DO NOT DELETE IN CASE AN EXAMPLE IS ADDED IN THE FUTURE -->
566
<refsect2 id="example1">
571
<informaltable frame="none">
572
<tgroup cols="1" align="left" colsep="0" rowsep="0">
573
<colspec colname="col1" colnum="1" />
577
Example goes here - it will be set in "code" type with white space preserved.
586
<!-- ================================ SPECIFICATION -->
587
<!-- Set the "uri" attribute in the <olink /> element to the "named destination" for the PDF page
589
<refsect1 id="specification"><title>Specification</title>
592
<imagedata fileref="pdficon_small1.gif" format="gif" />
595
<olink uri="mathFunctions">OpenCL Specification</olink>
599
<!-- ================================ ALSO SEE -->
601
<refsect1 id="seealso"><title>Also see</title>
603
<citerefentry href="mathFunctions"><refentrytitle>Math Functions</refentrytitle></citerefentry>
607
<!-- ============================== COPYRIGHT -->
608
<!-- Content included from copyright.inc.xsl -->
610
<refsect3 id="Copyright"><title></title>
612
<imagedata fileref="KhronosLogo.jpg" format="jpg" />