summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2026-02-11 13:50:29 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2026-02-11 13:50:29 +0100
commit270dfb1ebd40a848bb5c79cf69cf31325457b20c (patch)
tree094de2c458ca57d6817a4bb29ea94b7672f344e9
parent3a65785e51c1986072478f2d4e69ba2e4eb791c9 (diff)
feat: CoreRuntimeKit:C++: Runtime improvements.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
-rw-r--r--include/CoreRuntimeKit/C++/base_math9
1 files changed, 5 insertions, 4 deletions
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;