Skip to content

Commit

Permalink
Rename ONE_OVER_F to ONE_OVER_F_F
Browse files Browse the repository at this point in the history
  • Loading branch information
overmighty committed Oct 18, 2024
1 parent b02dbce commit b1c21c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libc/src/math/generic/log10f16.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ LLVM_LIBC_FUNCTION(float16, log10f16, (float16 x)) {
// log10(1.mant) = log10(f) + log10(1.mant / f)
// = log10(f) + log10(1 + d/f)
// since d/f is sufficiently small.
// We store log10(f) and 1/f in the lookup tables LOG10F_F and ONE_OVER_F
// We store log10(f) and 1/f in the lookup tables LOG10F_F and ONE_OVER_F_F
// respectively.

int m = -FPBits::EXP_BIAS;
Expand All @@ -146,7 +146,7 @@ LLVM_LIBC_FUNCTION(float16, log10f16, (float16 x)) {
x_bits.set_biased_exponent(FPBits::EXP_BIAS);
float mant_f = x_bits.get_val();
// v = 1.mant * 1/f - 1 = d/f
float v = fputil::multiply_add(mant_f, ONE_OVER_F[f], -1.0f);
float v = fputil::multiply_add(mant_f, ONE_OVER_F_F[f], -1.0f);

// Degree-3 minimax polynomial generated by Sollya with the following
// commands:
Expand Down

0 comments on commit b1c21c8

Please sign in to comment.