[libc] Add missing LIBC_INLINE to functions defined in .h files (#213442)
This commit is contained in:
parent
350089d0cb
commit
4671437fb0
2 changed files with 5 additions and 4 deletions
|
|
@ -126,13 +126,13 @@ LIBC_INLINE DoubleDouble poly_approx_dd(const DoubleDouble &dx) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUGDEBUG
|
#ifdef DEBUGDEBUG
|
||||||
std::ostream &operator<<(std::ostream &OS, const DFloat128 &r) {
|
LIBC_INLINE std::ostream &operator<<(std::ostream &OS, const DFloat128 &r) {
|
||||||
OS << (r.sign == Sign::NEG ? "-(" : "(") << r.mantissa.val[0] << " + "
|
OS << (r.sign == Sign::NEG ? "-(" : "(") << r.mantissa.val[0] << " + "
|
||||||
<< r.mantissa.val[1] << " * 2^64) * 2^" << r.exponent << "\n";
|
<< r.mantissa.val[1] << " * 2^64) * 2^" << r.exponent << "\n";
|
||||||
return OS;
|
return OS;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::ostream &operator<<(std::ostream &OS, const DoubleDouble &r) {
|
LIBC_INLINE std::ostream &operator<<(std::ostream &OS, const DoubleDouble &r) {
|
||||||
OS << std::hexfloat << "(" << r.hi << " + " << r.lo << ")"
|
OS << std::hexfloat << "(" << r.hi << " + " << r.lo << ")"
|
||||||
<< std::defaultfloat << "\n";
|
<< std::defaultfloat << "\n";
|
||||||
return OS;
|
return OS;
|
||||||
|
|
|
||||||
|
|
@ -108,8 +108,9 @@ LIBC_INLINE double tan_eval(const DoubleDouble &u, DoubleDouble &result) {
|
||||||
// Calculation a / b = a * (1/b) for DFloat128.
|
// Calculation a / b = a * (1/b) for DFloat128.
|
||||||
// Using the initial approximation of q ~ (1/b), then apply 2 Newton-Raphson
|
// Using the initial approximation of q ~ (1/b), then apply 2 Newton-Raphson
|
||||||
// iterations, before multiplying by a.
|
// iterations, before multiplying by a.
|
||||||
[[maybe_unused]] DFloat128 newton_raphson_div(const DFloat128 &a, DFloat128 b,
|
[[maybe_unused]] LIBC_INLINE DFloat128 newton_raphson_div(const DFloat128 &a,
|
||||||
double q) {
|
DFloat128 b,
|
||||||
|
double q) {
|
||||||
DFloat128 q0(q);
|
DFloat128 q0(q);
|
||||||
LIBC_BIT_CAST_CONSTEXPR_VAR DFloat128 TWO(2.0);
|
LIBC_BIT_CAST_CONSTEXPR_VAR DFloat128 TWO(2.0);
|
||||||
b.sign = (b.sign == Sign::POS) ? Sign::NEG : Sign::POS;
|
b.sign = (b.sign == Sign::POS) ? Sign::NEG : Sign::POS;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue