From 3730ac67cd4871a79ac0baa0693facd02970f26c Mon Sep 17 00:00:00 2001 From: Tanner Gooding Date: Sat, 19 Oct 2019 11:59:46 -0700 Subject: [PATCH] Fixing Perf_Single.IsNaN and Perf_Double.IsNaN to do `result |=` rather than `result &=` --- src/benchmarks/micro/corefx/System.Runtime/Perf.Double.cs | 2 +- src/benchmarks/micro/corefx/System.Runtime/Perf.Single.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/benchmarks/micro/corefx/System.Runtime/Perf.Double.cs b/src/benchmarks/micro/corefx/System.Runtime/Perf.Double.cs index bfcee5f5a4..f2067e5636 100644 --- a/src/benchmarks/micro/corefx/System.Runtime/Perf.Double.cs +++ b/src/benchmarks/micro/corefx/System.Runtime/Perf.Double.cs @@ -38,7 +38,7 @@ public bool IsNaN(double value) for (int i = 0; i < 1000000; i++) { - result &= double.IsNaN(value); + result |= double.IsNaN(value); value += 1.0; } diff --git a/src/benchmarks/micro/corefx/System.Runtime/Perf.Single.cs b/src/benchmarks/micro/corefx/System.Runtime/Perf.Single.cs index dd052f9e01..e2a4f73648 100644 --- a/src/benchmarks/micro/corefx/System.Runtime/Perf.Single.cs +++ b/src/benchmarks/micro/corefx/System.Runtime/Perf.Single.cs @@ -36,7 +36,7 @@ public bool IsNaN(float value) for (int i = 0; i < 1000000; i++) { - result &= float.IsNaN(value); + result |= float.IsNaN(value); value += 1.0f; }