[libc-commits] [libc] 7f2ce19 - [libc][nfc][obvious] fix typos in FPUtil
Michael Jones via libc-commits
libc-commits at lists.llvm.org
Mon Aug 30 15:39:09 PDT 2021
Author: Michael Jones
Date: 2021-08-30T22:39:02Z
New Revision: 7f2ce19d1cf1dd08330ae8e5ef8aa2130aaf5833
URL: https://github.com/llvm/llvm-project/commit/7f2ce19d1cf1dd08330ae8e5ef8aa2130aaf5833
DIFF: https://github.com/llvm/llvm-project/commit/7f2ce19d1cf1dd08330ae8e5ef8aa2130aaf5833.diff
LOG: [libc][nfc][obvious] fix typos in FPUtil
Fix minor typos in FPUtil comments.
Reviewed By: michaelrj
Differential Revision: https://reviews.llvm.org/D108952
Added:
Modified:
libc/src/__support/FPUtil/FMA.h
libc/src/__support/FPUtil/Sqrt.h
libc/src/__support/FPUtil/generic/README.md
Removed:
################################################################################
diff --git a/libc/src/__support/FPUtil/FMA.h b/libc/src/__support/FPUtil/FMA.h
index cbb7fe4ce40fe..4161554ab0422 100644
--- a/libc/src/__support/FPUtil/FMA.h
+++ b/libc/src/__support/FPUtil/FMA.h
@@ -21,7 +21,7 @@
namespace __llvm_libc {
namespace fputil {
-// We have a generic implementation available only for single precision fma os
+// We have a generic implementation available only for single precision fma as
// we restrict it to float values for now.
template <typename T>
static inline cpp::EnableIfType<cpp::IsSame<T, float>::Value, T> fma(T x, T y,
diff --git a/libc/src/__support/FPUtil/Sqrt.h b/libc/src/__support/FPUtil/Sqrt.h
index 6bba29fc0aee1..041031faa3a8c 100644
--- a/libc/src/__support/FPUtil/Sqrt.h
+++ b/libc/src/__support/FPUtil/Sqrt.h
@@ -121,7 +121,7 @@ static inline T sqrt(T x) {
int xExp = bits.getExponent();
UIntType xMant = bits.getMantissa();
- // Step 1a: Normalize denormal input and append hiddent bit to the mantissa
+ // Step 1a: Normalize denormal input and append hidden bit to the mantissa
if (bits.getUnbiasedExponent() == 0) {
++xExp; // let xExp be the correct exponent of One bit.
internal::normalize<T>(xExp, xMant);
diff --git a/libc/src/__support/FPUtil/generic/README.md b/libc/src/__support/FPUtil/generic/README.md
index fff09ea51e7c1..e435325891a65 100644
--- a/libc/src/__support/FPUtil/generic/README.md
+++ b/libc/src/__support/FPUtil/generic/README.md
@@ -4,7 +4,7 @@ operations. The implementations are nested in the namespace
implementations from machine dependent implementations. Consider the example of
the fuse-multiply-add operation (FMA). The C standard library requires three
diff erent flavors, `fma` which operates double precsion numbers, `fmaf` which
-operates on single precision numbers, and `fmal` which operates on `lond double`
+operates on single precision numbers, and `fmal` which operates on `long double`
numbers. On Aarch64, there are hardware instructions which implement the single
and double precision flavors but not the `long double` flavor. For such targets,
we want to be able to call the generic `long double` implementation from the
More information about the libc-commits
mailing list