summaryrefslogtreecommitdiff
path: root/Source/Core/Common/FloatUtils.cpp
diff options
context:
space:
mode:
authorOatmealDome <OatmealDome@users.noreply.github.com>2025-08-17 13:00:19 -0400
committerGitHub <noreply@github.com>2025-08-17 13:00:19 -0400
commit52806b3dc82954bf222166d5870e0d8825c977d9 (patch)
treee82786694a8b523a02ca20aa3a50b325cf9878a8 /Source/Core/Common/FloatUtils.cpp
parentab1f75b4d60c4314a7fd928e7f5538c21750485d (diff)
parent221d396b3acb9e0d1a815cbf7613a9f7032cc14a (diff)
Merge pull request #13881 from OatmealDome/clang-floating-point-nonsense-2
FloatUtils: Replace quieting SNaNs via `0.0 + x` with MakeQuiet
Diffstat (limited to 'Source/Core/Common/FloatUtils.cpp')
-rw-r--r--Source/Core/Common/FloatUtils.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/Common/FloatUtils.cpp b/Source/Core/Common/FloatUtils.cpp
index a671eb278c..312d4a88a2 100644
--- a/Source/Core/Common/FloatUtils.cpp
+++ b/Source/Core/Common/FloatUtils.cpp
@@ -108,7 +108,7 @@ double ApproximateReciprocalSquareRoot(double val)
return 0.0;
}
- return 0.0 + val;
+ return MakeQuiet(val);
}
// Negative numbers return NaN
@@ -165,7 +165,7 @@ double ApproximateReciprocal(double val)
{
if (mantissa == 0)
return std::copysign(0.0, val);
- return 0.0 + val;
+ return MakeQuiet(val);
}
// Special case small inputs