[libc-commits] [libc] [llvm] [libc][math] Refactor sqrti to header-only (PR #177960)

Vedant Neve via libc-commits libc-commits at lists.llvm.org
Tue Feb 24 06:05:18 PST 2026


0bVdnt wrote:

> > > > @lntue You're right, sqrti function does not currently exist as a libc entry point. While working on the issue I interpreted it as requiring a new shared implementation. @bassiounix could you clarify the intended scope of #177650 ? Should sqrti exist as a function or the issue is about something else?
> > > 
> > > 
> > > Haven't you worked on other issue like this before? I recall #175524 at least! Do you see any difference from the latter?
> > 
> > 
> > Yes, #175524 was about refactoring an existing libc entry point (llogb.cpp). This one is different because sqrti does not exist as a libc entry point, there is no sqrti.h or libc/src/math/generic/sqrti.cpp on main. So should i create one or should sqrti remain only as a shared/support utility without a public libc entry point?
> 
> Since it is not implemented yet, no refactoring work to do. Unless you are interested in implementing this math function in libc. Are you interested to implement `sqrti`?

Yes, I'd be interested! Since `sqrti` isn't part of any standard, could you please point me to a reference or specification for the intended API? Specifically:
- What should the function signature(s) should look like?
- Which type widths should be supported?
- Should it be exposed as a public libc entry point, or only as an internal/shared library?
Happy to proceed once there's a clear target to implement against. :)

https://github.com/llvm/llvm-project/pull/177960


More information about the libc-commits mailing list