Bananymous
e9c81477d7
BAN/LibC: Implement remainder
...
This is basically just fmod but with fprem1 instead of fprem
2026-03-25 01:06:45 +02:00
Bananymous
09292bb87e
BAN: Cleanup math code and add SSE sqrt
...
We should prefer SSE instructions when they are easily available. For
other functions x87 is just simpler. It's hard to write faster and close
to as accurate approximations with SSE.
This does not use xmmintrin.h as clangd does not like that file and
starts throwing errors in every file that includes this :)
2026-03-22 22:07:48 +02:00
Bananymous
346853ee55
BAN: Implement sincos to math
...
This function calculates both sin and cos fast (hopefully)
2024-11-04 17:42:01 +02:00
Bananymous
f4be37700f
Kernel/userspace: rework floating point math
...
SSE is now unconditionally enabled any where and most of math.h is now
actually implemented. using __builtin_<func> lead to many hangs where
the builtin function would just call itself.
2024-11-03 20:28:15 +02:00
Bananymous
05e9d76c77
BAN: Implement will_{addition,multiplication}_overflow
2024-06-14 11:04:29 +03:00
Bananymous
dfe5a2d665
All: Cleanup all files
...
Add newline to end of files and remove whitespace from end of lines
2024-01-24 15:53:38 +02:00
Bananymous
861bf27e96
BAN: Implement abs()
2023-12-26 00:54:06 +02:00
Bananymous
0f74e123b8
BAN: Implement ilog2 for unsigned integers
2023-12-07 23:50:04 +02:00
Bananymous
0b93fce923
BAN: Remove endianness functions from Math
...
There is now a Endianness.h for these. The functions were super slow.
2023-09-29 19:38:07 +03:00
Bananymous
0d9422ead8
BAN: add pow, log2, log10, log in math
...
These are implemented using x86 floating point assembly
2023-05-10 19:03:33 +03:00
Bananymous
9cf09165b5
BAN: Add is_power_of_two to Math functions
2023-04-28 14:42:49 +03:00
Bananymous
6c1f0d1dc8
BAN: Add big_endian_to_host in Math
2023-02-23 15:58:32 +02:00
Bananymous
0e77b4dc4e
BAN: You can now transform little endian data to host endian
2023-02-22 21:47:22 +02:00
Bananymous
9aab67fed8
BAN: make all Math functions inline constexpr
2023-02-22 01:17:56 +02:00
Bananymous
66a4b69a29
BAN: Math now uses template concepts and add div_round_up
2023-02-19 00:48:56 +02:00
Bananymous
6f9552d673
BAN: Add math to its own namespace
2023-01-10 19:11:27 +02:00
Bananymous
b60af90538
BAN: Add min, max and clamp
2022-12-30 19:52:16 +02:00