Skip to content

Commit fbb2251

Browse files
refactoring rint -> floor
1 parent 351b255 commit fbb2251

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

mkl_umath/src/loops_intel.c.src

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,17 +122,15 @@ static inline npy_float spacingf(npy_float x) {
122122
}
123123

124124
static inline npy_double divmod(npy_double x1, npy_double x2, npy_double *mod) {
125-
fesetround(FE_DOWNWARD);
126-
npy_double q = rint(x1 / x2);
125+
npy_double q = floor(x1 / x2);
127126

128127
*mod = x1 - q * x2;
129128

130129
return q;
131130
}
132131

133132
static inline npy_float divmodf(npy_float x1, npy_float x2, npy_float *mod) {
134-
fesetround(FE_DOWNWARD);
135-
npy_float q = rintf(x1 / x2);
133+
npy_float q = floorf(x1 / x2);
136134

137135
*mod = x1 - q * x2;
138136

0 commit comments

Comments
 (0)