Skip to content

Commit 92ba355

Browse files
committed
Testing if the new float comparison caused the random crash on Windows.
1 parent ac1634d commit 92ba355

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Source/DFPSR/base/simd.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2108,7 +2108,7 @@
21082108
left.writeAlignedUnsafe(&(a[0])); \
21092109
right.writeAlignedUnsafe(&(b[0])); \
21102110
for (int i = 0; i < LANE_COUNT; i++) { \
2111-
if ((a[i] > b[i] + 0.0001f) || (a[i] < b[i] - 0.0001f)) return false; \
2111+
if (fabs(a[i] - b[i]) >= 0.0001f) return false; \
21122112
} \
21132113
return true; \
21142114
} \
@@ -2118,7 +2118,7 @@
21182118
left.writeAlignedUnsafe(&(a[0])); \
21192119
right.writeAlignedUnsafe(&(b[0])); \
21202120
for (int i = 0; i < LANE_COUNT; i++) { \
2121-
if (!((a[i] > b[i] + 0.0001f) || (a[i] < b[i] - 0.0001f))) return false; \
2121+
if (fabs(a[i] - b[i]) < 0.0001f) return false; \
21222122
} \
21232123
return true; \
21242124
}

Source/test/TestCaller.DsrProj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ CompilerFlag "-std=c++14"
55
CompilerFlag "-march=native"
66

77
Debug = 1
8+
Optimization = 0
89
Supressed = 1
910
Graphics = 0
1011
Sound = 0

0 commit comments

Comments
 (0)