From 270dfb1ebd40a848bb5c79cf69cf31325457b20c Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Wed, 11 Feb 2026 13:50:29 +0100 Subject: feat: CoreRuntimeKit:C++: Runtime improvements. Signed-off-by: Amlal El Mahrouss --- include/CoreRuntimeKit/C++/base_math | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'include/CoreRuntimeKit/C++') diff --git a/include/CoreRuntimeKit/C++/base_math b/include/CoreRuntimeKit/C++/base_math index a025b62..fac078d 100644 --- a/include/CoreRuntimeKit/C++/base_math +++ b/include/CoreRuntimeKit/C++/base_math @@ -49,12 +49,13 @@ inline real_type sqrt(real_type in) { if (in == 0) return 0; if (in == not_a_number) return not_a_number; - auto constexpr const static Base = 2; + auto constexpr static kRootBase = 2; + auto constexpr static kNumberBase = 10; - auto x = in / Base; + auto x = in / kRootBase; - for (int i = 0; i < 10; ++i) { - x = (x + in / x) / Base; + for (int i = 0; i < kNumberBase; ++i) { + x = (x + in / x) / kRootBase; } return x; -- cgit v1.2.3