From 5e855a2de4b3195536ccb33c3806aeefefeec431 Mon Sep 17 00:00:00 2001 From: tvaneerd Date: Tue, 15 Mar 2016 08:53:02 -0400 Subject: [PATCH] == instead of = really should be +/- epsilon, or change double to int --- CppCoreGuidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index ef30aca..9dd0706 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -10167,7 +10167,7 @@ Note that this applies most urgently to library code and least urgently to stand static double cached_result = COMPUTATION_OF_ZERO; double result; - if (cached_x = x) + if (cached_x == x) return cached_result; result = computation(x); cached_x = x;