74 Commits

Author SHA1 Message Date
Dasha Buka
69e855bb1b
[libc][math] Refactor ilogb implementation to header-only in src/__support/math folder. (#175504)
closes #175348
2026-01-28 07:45:47 +02:00
DannyDaoBoYang
f92948fa9b
[libc][math] Refactor sinpif to Header Only. (#176580)
closes [#176477](https://github.com/llvm/llvm-project/issues/176477)

Part of https://github.com/llvm/llvm-project/issues/147386

in preparation for:
https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2026-01-28 07:42:22 +02:00
Sersawy
04402d32a5
[libc][math] Refactor llogbf16 to header-only (#178078)
Closes #175351
2026-01-28 07:09:14 +02:00
Prajwal KP
4c11b005f2
[libc][math] Refactor sqrtf16 to Header Only (#177726)
closes: #177651
2026-01-28 06:43:52 +02:00
Nico Weber
90829e51cf
[libc][math] Refactor sinf16 implementation to header-only in src/__support/math folder. (#178062)
Part of #147386
    
in preparation for:

https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2026-01-27 08:17:33 -05:00
Vedant Neve
865b2e9e00
[libc][math] Refactor llogb to Header Only (#175524)
Fixes #175360
2026-01-27 05:56:49 +02:00
Anikesh Parashar
667703ed1b
[libc][math] Refractor sinhf16 to Header only (#177337)
Part of #147386

Resolves #177645
2026-01-27 02:32:41 +02:00
Ramshankar
54c5dcbf7d
[libc][math] Refactor ilogbf128 to Header Only (#175396)
Refactors the ilogbf128 implementation to be header-only and available via shared math.

fixes: #175345
2026-01-27 02:17:06 +02:00
Anikesh Parashar
2e99240dce
[libc][math] Refractor sinhf to Header only (#177336)
Part of #147386

Resolves #177644
2026-01-27 02:15:00 +02:00
Nico Weber
5caf27eff3
[libc][math] Refactor sinf implementation to header-only in src/__support/math folder. (#177963)
Part of #147386

in preparation for:


https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2026-01-26 16:41:46 -05:00
Anikesh Parashar
693a018dcf
[libc][math] Refractor logf to Header only (#176834)
Resolves #175368
2026-01-26 21:59:14 +02:00
Cheng Lingfei
bd3ecdc59b
[libc][math] Refactor f16sqrtl to Header Only. (#176333)
builds correctly with both `clang`, `gcc`, `cmake`, and `Bazel`.

Closes https://github.com/llvm/llvm-project/issues/175331.
2026-01-26 20:06:40 +02:00
Nico Weber
f255bec95c
[libc][math] Refactor tanf implementation to header-only in src/__support/math folder. (#177730)
Part of #147386

in preparation for:
https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2026-01-25 01:54:34 +02:00
Nico Weber
5234bac082
[libc][math] Refactor tan implementation to header-only in src/__support/math folder. (#177224)
Part of #147386

in preparation for:


https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2026-01-23 23:56:05 +02:00
Prajwal
4435083c26
[libc][math] Refactor f16fmal to header-only (#176576)
closes #175324 
part of #175313
2026-01-23 21:30:28 +02:00
Madhur Kumar
ff97d1a5e3
[libc][math] Refactor dfmaf128 to Header Only (#176480)
Closes https://github.com/llvm/llvm-project/issues/175315, Part of
https://github.com/llvm/llvm-project/issues/175344
2026-01-23 21:02:46 +02:00
Nico Weber
86a2486bff
[libc][math] Refactor log10, log1p, log2 implementation to header-only in src/__support/math folder. (#176089)
Part of #147386

in preparation for:

https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2026-01-21 17:44:33 +00:00
Anonymous
82204a482b
[libc][math] Refactor ilogbf implementation to header-only in src/__support/math folder. (#175522)
closes #175347 , part of #175344
2026-01-19 17:57:36 +02:00
Islam Imad
5104e7783e
[libc][math] Refactor f16fma to header only (#176244)
closes #175320

Part of #175313
2026-01-19 11:01:03 +02:00
Anonmiraj
022888ec1c
[libc][math] Refactor fsqrtf128 to Header Only. (#175686)
builds correctly with both Clang and GCC 12.2.

Closes #175333.
2026-01-17 02:19:53 +02:00
Anonmiraj
6397207d61
[libc][math] Refactor ilogbl to Header Only. (#176500)
builds with both Clang and GCC 12.2.

Closes https://github.com/llvm/llvm-project/issues/175349.
2026-01-17 02:17:30 +02:00
Anonmiraj
997fdefa4c
[libc][math] Refactor llogbf to Header Only. (#176494)
builds with both Clang and GCC 12.2.

Closes https://github.com/llvm/llvm-project/issues/175354.
2026-01-17 02:06:46 +02:00
Anonmiraj
08bcd7cb00
[libc][math] Refactor hypotf to Header Only. (#175679)
builds correctly with both Clang and GCC 12.2.

Closes #175338.
2026-01-17 01:34:38 +02:00
Anonmiraj
716b54784f
[libc][math] Refactor logbf to Header Only. (#176222)
builds with both Clang and GCC 12.2.

Closes https://github.com/llvm/llvm-project/issues/175364.
2026-01-17 00:15:04 +02:00
Anonmiraj
dac308c7d3
[libc][math] Refactor logbf16 to Header Only. (#176231)
builds with both Clang and GCC 12.2.

Closes https://github.com/llvm/llvm-project/issues/175363.
2026-01-16 23:56:36 +02:00
Anonmiraj
6c496a1e5f
[libc][math] Refactor logbf128 to Header Only. (#176234)
builds with both Clang and GCC 12.2.

Closes #175362.
2026-01-16 23:33:24 +02:00
Jolynn Wee Zhuo Lin
f8278a152f
[libc][math] Refactor fsqrt to Header Only (#175444)
Fixes https://github.com/llvm/llvm-project/issues/175334
2026-01-16 08:16:04 +02:00
Anonmiraj
ac9f0ce724
[libc][math] Refactor dfmal to Header Only. (#175359)
builds correctly with both Clang and GCC 12.2.

Since `fma` is not `constexpr`, `dfmal` cannot be declared `constexpr`
either.
Closes #175316.
2026-01-16 06:25:39 +02:00
mitchell
79be97d90a
[libc][math] Refactor ilogbf16 implementation to header-only in src/__support/math folder. (#175450)
Closes [#175346](https://github.com/llvm/llvm-project/issues/175346),
Part of #175344
2026-01-12 05:05:35 +02:00
CarvedCoder
bc51c9d5f2
[libc][math] Refactor log to header-only shared math (#175395)
Refactors log to a header-only shared math implementation.

Fixes #175369
2026-01-12 01:22:01 +02:00
lntue
43b8bc4b6f
[libc][math] Refactor sin implementation to header-only in src/__support/math folder. (#175200)
Part of #147386

in preparation for:
https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2026-01-09 23:45:24 -05:00
Muhammad Bassiouni
1600b05fda
[libc][math] Refactor expm1f16 implementation to header-only in src/__support/math folder. (#162132)
Part of #147386

in preparation for:
https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2026-01-10 04:15:56 +02:00
Muhammad Bassiouni
60e7c4709c
[libc][math] Refactor expm1f implementation to header-only in src/__support/math folder. (#162131)
Part of #147386

in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-12-19 21:56:38 +02:00
Muhammad Bassiouni
e8defb503d
[libc][math] Refactor expm1 implementation to header-only in src/__support/math folder. (#162127)
Part of #147386

in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-12-04 16:51:43 +02:00
Muhammad Bassiouni
0d77cba6e1
[libc][math] Refactor exp2m1f16 implementation to header-only in src/__support/math folder. (#162019)
Part of #147386

in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-11-05 14:50:40 +02:00
Muhammad Bassiouni
a55c4c812e
[libc][math] Refactor exp2m1f implementation to header-only in src/__support/math folder. (#162017)
Part of #147386

in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-10-17 18:27:51 +03:00
Muhammad Bassiouni
878527651a
[libc][math] Refactor exp2f16 implementation to header-only in src/__support/math folder. (#161993)
Part of #147386

in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-10-11 23:27:00 +03:00
Anton Shepelev
1244fd24d9
[libc][math][c23] Add rsqrtf() function (#159615)
Closes #159614

**Changes:**
- Initial implementation of rsqrt for single precision float

**Some small unrelated style changes to this PR (that I missed in my
rsqrtf16 PR):**
- Added extra - to the top comments to make it look nicer in
libc/shared/math/rsqrtf16.h
- Put rsqrtf16 inside of libc/src/__support/math/CMakeLists.txt in
sorted order
- Rearanged libc_math_function rsqrtf16 in Bazel to match alphabetical
order
2025-10-08 23:37:01 -04:00
Muhammad Bassiouni
596ff855d0
[libc][math] Refactor exp2f implementation to header-only in src/__support/math folder. (#161992)
Part of #147386

in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-10-06 21:23:44 +03:00
Muhammad Bassiouni
3e78c313bc
[libc][math] Refactor exp2 implementation to header-only in src/__support/math folder. (#161297)
Part of #147386

in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-10-05 06:31:39 +03:00
Muhammad Bassiouni
6c032fa600
[libc][math] Refactor exp10m1f16 implementation to header-only in src/__support/math folder. (#161119)
Part of #147386

in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-10-01 11:21:19 +03:00
Muhammad Bassiouni
23d3caf854
[libc][math] Refactor exp10m1f implementation to header-only in src/__support/math folder. (#159897)
Part of #147386

in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-09-29 07:58:03 +03:00
Maksim Levental
c1d838e6f2
[libc] fix error: implicit conversion loses floating-point precision: 'double' to 'float' in shared_math_test.cpp (#159934)
This test fails under `-Werror=implicit-float-conversion` (like in our
pre-merge CI) because `dsqrtl` returns a double
2b937daa13/libc/src/__support/math/dsqrtl.h (L18)

Fixes https://github.com/llvm/llvm-project/issues/159932
2025-09-20 17:07:40 +00:00
Muhammad Bassiouni
2b937daa13
[libc][math] Refactor dsqrtl implementation to header-only in src/__support/math folder. (#154868)
Part of #147386

in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-09-20 07:24:21 +03:00
Anton Shepelev
80f9c72a1e
[libc][math][c23] Add rsqrtf16() function (#137545)
Addresses #132818 
Part of #95250
2025-09-17 10:19:20 -04:00
Muhammad Bassiouni
4d323206ed
[libc][math] Refactor cospif16 implementation to header-only in src/__support/math folder. (#154222)
Part of #147386

in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-08-22 05:04:13 +03:00
Muhammad Bassiouni
783859b2a0
[libc][math] Refactor cospif implementation to header-only in src/__support/math folder. (#154215)
Part of #147386

in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-08-22 04:53:18 +03:00
Muhammad Bassiouni
2c79dc1082
[libc][math] Refactor coshf16 implementation to header-only in src/__support/math folder. (#153582)
Part of #147386

in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-08-19 02:08:07 +03:00
Muhammad Bassiouni
9ddc85f6d5
[libc][math] Refactor coshf implementation to header-only in src/__support/math folder. (#153427)
Part of #147386

in preparation for:
https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-08-14 17:19:47 +03:00
Muhammad Bassiouni
0f6d3ad0fe
[libc][math] Refactor cosf16 implementation to header-only in src/__support/math folder. (#152871)
Part of #147386

in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-08-13 18:04:35 +03:00