Skip to content

Commit 6aea976

Browse files
committed
Workaround MSVC 19.42.34433 ICE
1 parent 4ac22f6 commit 6aea976

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

include/kfr/math/impl/sin_cos.hpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,8 @@ KFR_INTRINSIC vec<T, N> trig_fold(const vec<T, N>& x, vec<itype<T>, N>& quadrant
6565
quadrant = broadcastto<itype<T>>(broadcastto<int>(y - floor(y * T(1.0 / 16.0)) * T(16.0)));
6666

6767
const vec<itype<T>, N> odd = (quadrant & 1);
68-
quadrant = quadrant + odd;
68+
quadrant = (quadrant + odd) & itype<T>(7);
6969
y = y + cast<T>(odd);
70-
quadrant = quadrant & 7;
7170

7271
constexpr T hi = constants<T>::fold_constant_hi;
7372
constexpr T rem1 = constants<T>::fold_constant_rem1;

0 commit comments

Comments
 (0)