From f806cc602a3e3fa11138dad135265138ba97e962 Mon Sep 17 00:00:00 2001 From: Robin Leroy Date: Tue, 31 Dec 2024 03:24:20 +0100 Subject: [PATCH] More comments --- numerics/sin_cos.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/numerics/sin_cos.cpp b/numerics/sin_cos.cpp index 76690554a5..fc829a11e5 100644 --- a/numerics/sin_cos.cpp +++ b/numerics/sin_cos.cpp @@ -33,6 +33,7 @@ #if PRINCIPIA_USE_OSACA_SIN || PRINCIPIA_USE_OSACA_COS #include "intel/iacaMarks.h" static bool OSACA_loop_terminator = false; + #define OSACA_FUNCTION_BEGIN(arg) \ double volatile OSACA_input = arg; \ /* Putting a load of the input from memory in the analysed section makes */ \ @@ -52,6 +53,7 @@ static bool OSACA_loop_terminator = false; double volatile OSACA_result = OSACA_loop_carry; \ IACA_VC64_END; \ return OSACA_result + #define OSACA_IF(condition) \ if constexpr (bool volatile OSACA_computed_condition = (condition); \ [] { UNDER_OSACA_HYPOTHESES(return (condition)); }()) @@ -181,7 +183,7 @@ inline double DetectDangerousRounding(double const x, double const Δx) { // TODO(phl): Error analysis to refine the thresholds. Also, can we avoid // negative numbers? OSACA_IF(normalized_error < -0x1.ffffp971 && - normalized_error > -0x1.00008p972) { + normalized_error > -0x1.00008p972) { #if _DEBUG LOG(ERROR) << std::setprecision(25) << x << " " << std::hexfloat << value << " " << error << " " << normalized_error;