#include "src/math/expm1.h"
#include "common_constants.h"
#include "explogxf.h"
#include "src/__support/CPP/bit.h"
#include "src/__support/CPP/optional.h"
#include "src/__support/FPUtil/FEnvImpl.h"
#include "src/__support/FPUtil/FPBits.h"
#include "src/__support/FPUtil/PolyEval.h"
#include "src/__support/FPUtil/double_double.h"
#include "src/__support/FPUtil/dyadic_float.h"
#include "src/__support/FPUtil/except_value_utils.h"
#include "src/__support/FPUtil/multiply_add.h"
#include "src/__support/FPUtil/nearest_integer.h"
#include "src/__support/FPUtil/rounding_mode.h"
#include "src/__support/FPUtil/triple_double.h"
#include "src/__support/common.h"
#include "src/__support/integer_literals.h"
#include "src/__support/macros/config.h"
#include "src/__support/macros/optimization.h"
#if ((LIBC_MATH & LIBC_MATH_SKIP_ACCURATE_PASS) != 0)
#define LIBC_MATH_EXPM1_SKIP_ACCURATE_PASS
#endif
namespace LIBC_NAMESPACE_DECL {
DoubleDouble;
TripleDouble;
Float128;
operator""_u128;
constexpr double LOG2_E = …;
constexpr uint64_t ERR_D = …;
[[maybe_unused]] constexpr uint64_t ERR_DD = …;
constexpr double MLOG_2_EXP2_M12_HI = …;
constexpr double MLOG_2_EXP2_M12_MID = …;
constexpr double MLOG_2_EXP2_M12_MID_30 = …;
constexpr double MLOG_2_EXP2_M12_LO = …;
namespace {
LIBC_INLINE double poly_approx_d(double dx) { … }
DoubleDouble poly_approx_dd(const DoubleDouble &dx) { … }
[[maybe_unused]] Float128 poly_approx_f128(const Float128 &dx) { … }
#ifdef DEBUGDEBUG
std::ostream &operator<<(std::ostream &OS, const Float128 &r) {
OS << (r.sign == Sign::NEG ? "-(" : "(") << r.mantissa.val[0] << " + "
<< r.mantissa.val[1] << " * 2^64) * 2^" << r.exponent << "\n";
return OS;
}
std::ostream &operator<<(std::ostream &OS, const DoubleDouble &r) {
OS << std::hexfloat << "(" << r.hi << " + " << r.lo << ")"
<< std::defaultfloat << "\n";
return OS;
}
#endif
[[maybe_unused]] Float128 expm1_f128(double x, double kd, int idx1, int idx2) { … }
DoubleDouble exp_double_double(double x, double kd, const DoubleDouble &exp_mid,
const DoubleDouble &hi_part) { … }
double set_exceptional(double x) { … }
}
LLVM_LIBC_FUNCTION(double, expm1, (double x)) { … }
}