From a1f70b39fa5770356d928889eba46c71e4caa4ee Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Mon, 29 Jan 2024 13:31:39 -0500 Subject: [PATCH] AK: Remove rsqrt() At least on arm64, this isn't very preciese: https://github.com/SerenityOS/serenity/issues/22739#issuecomment-1912909835 It is also now unused. --- AK/Math.h | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/AK/Math.h b/AK/Math.h index d063d5bc5c..99e839c6c0 100644 --- a/AK/Math.h +++ b/AK/Math.h @@ -502,23 +502,6 @@ constexpr T sqrt(T x) #endif } -template -constexpr T rsqrt(T x) -{ -#if ARCH(AARCH64) - AARCH64_INSTRUCTION(frsqrte, x); -#elif ARCH(X86_64) - if constexpr (IsSame) { - float res; - asm("rsqrtss %1, %0" - : "=x"(res) - : "x"(x)); - return res; - } -#endif - return (T)1. / sqrt(x); -} - template constexpr T cbrt(T x) {