1
0
mirror of https://github.com/SerenityOS/serenity synced 2024-07-09 06:00:45 +00:00
Commit Graph

10 Commits

Author SHA1 Message Date
Tim Ledbetter
d0d81e470e AK: Fix off by one error in integral ceil_log2()
Previously, certain values of `ceil_log2(x)` would be 1 smaller than
`ceil(log2(x))`.
2024-05-21 09:31:17 +02:00
implicitfield
f923016e0b AK: Add reinterpret_as_octal()
This is useful for parsing user-provided integers that should be
interpreted as octals.
2024-05-07 16:54:27 -06:00
Abuneri
b5bed37074 AK: Replace FP math in is_power_of with a purely integral algorithm
The previous naive approach was causing test failures because of
rounding issues in some exotic environments. In particular, MSVC
via MSBuild
2024-05-07 16:43:34 -06:00
Tim Ledbetter
e4715aa82a AK: Use correct type when calculating integral exp2()
Previously, integral `exp2()` would produce the incorrect result for
exponents above 31.
2023-10-27 21:59:44 -04:00
kleines Filmröllchen
a0705202ea Kernel/Ext2: Write superblock backups
We don't ever read them out, but this should make fsck a lot less mad.
2023-07-28 14:51:07 +02:00
Steffen Rusitschka
1aa07d7328 AK: Implement FloatExtractor<f128>
This patch adds support for 128-bit floating points in FloatExtractor.

This is required to build SerenityOS on MacOS/aarch64. It might break
building for Raspberry Pi.
2022-12-02 16:22:51 +01:00
MacDue
072a78b958 AK: Add AK::ceil(float) and AK::ceil_log2(integer)
Co-authored-by: Leon Albrecht <leon2002.la@gmail.com>
2022-06-30 11:16:22 +02:00
Andrew Kaster
83603d68d2 AK: Make sure we don't include Math.h or math.h from KERNEL 2022-04-23 10:43:32 -07:00
Hendiadyoin1
fbb798f98c AK: Move integral log2 and exp to IntegerMath.h 2022-02-06 17:52:33 +00:00
Hendiadyoin1
581c23dc55 AK: Introduce IntegralMath.h starting with pow<I> 2022-02-06 17:52:33 +00:00