10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
24 */
25 /*
26 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
27 * Use is subject to license terms.
28 */
29
30 #pragma weak remquof = __remquof
31
32 /* INDENT OFF */
33 /*
34 * float remquof(float x, float y, int *quo) return remainderf(x,y) and an
35 * integer pointer quo such that *quo = N mod (2**31), where N is the
36 * exact integeral part of x/y rounded to nearest even.
37 *
38 * remquof call internal fmodquof
39 */
40
41 #include "libm.h"
42 #include "libm_synonyms.h"
43 #include "libm_protos.h"
44 #include <math.h>
45 extern float fabsf(float);
46
47 static const int
48 is = (int) 0x80000000,
49 im = 0x007fffff,
50 ii = 0x7f800000,
51 iu = 0x00800000;
52
53 static const float zero = 0.0F, half = 0.5F;
54 /* INDENT ON */
55
56 static float
57 fmodquof(float x, float y, int *quo) {
58 float w;
59 int hx, ix, iy, iz, k, ny, nd, m, sq;
60
61 hx = *(int *) &x;
62 ix = hx & 0x7fffffff;
|
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
24 */
25 /*
26 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
27 * Use is subject to license terms.
28 */
29
30 #pragma weak __remquof = remquof
31
32 /* INDENT OFF */
33 /*
34 * float remquof(float x, float y, int *quo) return remainderf(x,y) and an
35 * integer pointer quo such that *quo = N mod (2**31), where N is the
36 * exact integeral part of x/y rounded to nearest even.
37 *
38 * remquof call internal fmodquof
39 */
40
41 #include "libm.h"
42 #include "libm_protos.h"
43 #include <math.h>
44 extern float fabsf(float);
45
46 static const int
47 is = (int) 0x80000000,
48 im = 0x007fffff,
49 ii = 0x7f800000,
50 iu = 0x00800000;
51
52 static const float zero = 0.0F, half = 0.5F;
53 /* INDENT ON */
54
55 static float
56 fmodquof(float x, float y, int *quo) {
57 float w;
58 int hx, ix, iy, iz, k, ny, nd, m, sq;
59
60 hx = *(int *) &x;
61 ix = hx & 0x7fffffff;
|