Sync libm with upstream freebsd.

This is a complete update.

Test: treehugger
Change-Id: I91cc4d57ea49b46b607fde8fa30e2e04ecc9e690
This commit is contained in:
Elliott Hughes 2022-07-12 17:01:46 -07:00
parent c700432ba8
commit 022e1aa767
3 changed files with 6 additions and 8 deletions

View File

@ -460,7 +460,7 @@ do { \
* or by having |c| a few percent smaller than |a|. Pre-normalization of * or by having |c| a few percent smaller than |a|. Pre-normalization of
* (a, b) may help. * (a, b) may help.
* *
* This is is a variant of an algorithm of Kahan (see Knuth (1981) 4.2.2 * This is a variant of an algorithm of Kahan (see Knuth (1981) 4.2.2
* exercise 19). We gain considerable efficiency by requiring the terms to * exercise 19). We gain considerable efficiency by requiring the terms to
* be sufficiently normalized and sufficiently increasing. * be sufficiently normalized and sufficiently increasing.
*/ */
@ -644,7 +644,7 @@ rnintl(long double x)
* return type provided their arg is a floating point integer. They can * return type provided their arg is a floating point integer. They can
* sometimes be more efficient because no rounding is required. * sometimes be more efficient because no rounding is required.
*/ */
#if (defined(amd64) || defined(__i386__)) && defined(__GNUCLIKE_ASM) #if defined(amd64) || defined(__i386__)
#define irint(x) \ #define irint(x) \
(sizeof(x) == sizeof(float) && \ (sizeof(x) == sizeof(float) && \
sizeof(__float_t) == sizeof(long double) ? irintf(x) : \ sizeof(__float_t) == sizeof(long double) ? irintf(x) : \
@ -657,7 +657,7 @@ rnintl(long double x)
#define i64rint(x) ((int64_t)(x)) /* only needed for ld128 so not opt. */ #define i64rint(x) ((int64_t)(x)) /* only needed for ld128 so not opt. */
#if defined(__i386__) && defined(__GNUCLIKE_ASM) #if defined(__i386__)
static __inline int static __inline int
irintf(float x) irintf(float x)
{ {
@ -677,7 +677,7 @@ irintd(double x)
} }
#endif #endif
#if (defined(__amd64__) || defined(__i386__)) && defined(__GNUCLIKE_ASM) #if defined(__amd64__) || defined(__i386__)
static __inline int static __inline int
irintl(long double x) irintl(long double x)
{ {

View File

@ -15,8 +15,7 @@ static const char rcsid[] =
#include "math_private.h" #include "math_private.h"
float float
cabsf(z) cabsf(float complex z)
float complex z;
{ {
return hypotf(crealf(z), cimagf(z)); return hypotf(crealf(z), cimagf(z));

View File

@ -8,8 +8,7 @@
#include <math.h> #include <math.h>
double double
drem(x, y) drem(double x, double y)
double x, y;
{ {
return remainder(x, y); return remainder(x, y);
} }