LLVM-libc, developed at Google over five years, implements the C standard library with a focus on portability, modularity, and clean C++ code. The project's math functions achieve correct rounding across all rounding modes, ensuring consistency in production systems where heterogeneous distributed computing demands deterministic results. MSVC and other LLVM projects now integrate LLVM-libc's math library for compiler use and runtime execution.
LLVM-libc, a modular C standard library project started in 2019 at Google, is being adopted by Microsoft's MSVC and other LLVM projects for math functions. The library prioritizes portability, modularity, and correct rounding across all rounding modes to ensure consistency in heterogeneous distributed systems.
MSVC is implementing C++23 constexpr cmath functions using LLVM Libc to achieve better accuracy, stability, and consistency than the existing Universal C Runtime. The feature will ship experimentally in compiler version 19.52, enabled via /std:c++23 and /Zc:cmath flags, as the team addresses mathematical inaccuracies and OS-dependent behavior in current math functions.