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

64 lines
1.7 KiB
C++

//===-- Floating point math functions ---------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_LIBC_SHARED_MATH_H
#define LLVM_LIBC_SHARED_MATH_H
#include "libc_common.h"
#include "math/acos.h"
#include "math/acosf.h"
#include "math/acosf16.h"
#include "math/acoshf.h"
#include "math/acoshf16.h"
#include "math/acospif16.h"
#include "math/asin.h"
#include "math/asinf.h"
#include "math/asinf16.h"
#include "math/asinhf.h"
#include "math/asinhf16.h"
#include "math/atan.h"
#include "math/atan2.h"
#include "math/atan2f.h"
#include "math/atan2f128.h"
#include "math/atanf.h"
#include "math/atanf16.h"
#include "math/atanhf.h"
#include "math/atanhf16.h"
#include "math/cbrt.h"
#include "math/cbrtf.h"
#include "math/cos.h"
#include "math/cosf.h"
#include "math/cosf16.h"
#include "math/coshf.h"
#include "math/coshf16.h"
#include "math/cospif.h"
#include "math/cospif16.h"
#include "math/dsqrtl.h"
#include "math/erff.h"
#include "math/exp.h"
#include "math/exp10.h"
#include "math/exp10f.h"
#include "math/exp10f16.h"
#include "math/exp10m1f.h"
#include "math/exp10m1f16.h"
#include "math/exp2.h"
#include "math/exp2f.h"
#include "math/expf.h"
#include "math/expf16.h"
#include "math/frexpf.h"
#include "math/frexpf128.h"
#include "math/frexpf16.h"
#include "math/ldexpf.h"
#include "math/ldexpf128.h"
#include "math/ldexpf16.h"
#include "math/rsqrtf.h"
#include "math/rsqrtf16.h"
#endif // LLVM_LIBC_SHARED_MATH_H