[libc-commits] [PATCH] D116228: [libc][NFC] fix variable name

Michael Jones via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Dec 23 10:42:19 PST 2021


michaelrj created this revision.
Herald added subscribers: libc-commits, ecnelises, tschuett.
Herald added a project: libc-project.
michaelrj requested review of this revision.

A variable was named in a way that doesn't match the format. This patch
renames it to match the format.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D116228

Files:
  libc/src/math/generic/logf.cpp


Index: libc/src/math/generic/logf.cpp
===================================================================
--- libc/src/math/generic/logf.cpp
+++ libc/src/math/generic/logf.cpp
@@ -167,20 +167,20 @@
   m += xbits.get_exponent();
   // Set bits to 1.m
   xbits.set_unbiased_exponent(0x7F);
-  int fIndex = xbits.get_mantissa() >> 16;
+  int f_index = xbits.get_mantissa() >> 16;
 
   FPBits f(xbits.val);
   f.bits &= ~0x0000'FFFF;
 
   double d = static_cast<float>(xbits) - static_cast<float>(f);
-  d *= ONE_OVER_F[fIndex];
+  d *= ONE_OVER_F[f_index];
 
   double r = __llvm_libc::fputil::polyeval(
       d, 0x1.0000000008169p+0, -0x1.0000004f78405p-1, 0x1.555654d2bc769p-2,
       -0x1.00a570d090322p-2, 0x1.e158d823f89cap-3);
 
   double extra_factor =
-      __llvm_libc::fputil::fma(static_cast<double>(m), LOG_2, LOG_F[fIndex]);
+      __llvm_libc::fputil::fma(static_cast<double>(m), LOG_2, LOG_F[f_index]);
   switch (FPBits(x).uintval()) {
   case 0x3f80d19f:
     return 0x1.a1e82cp-8f;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116228.396052.patch
Type: text/x-patch
Size: 999 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20211223/9d632174/attachment-0001.bin>


More information about the libc-commits mailing list