@@ -1,4 +1,4 @@
-#include "libm.h"
+#include <math.h>
double fdim(double x, double y)
{
float fdimf(float x, float y)
@@ -1,4 +1,5 @@
+#include <float.h>
#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
long double fdiml(long double x, long double y)
double fmax(double x, double y)
float fmaxf(float x, float y)
long double fmaxl(long double x, long double y)
double fmin(double x, double y)
float fminf(float x, float y)
long double fminl(long double x, long double y)
@@ -11,7 +11,6 @@ int ilogb(double x)
if (u.bits == 0)
return FP_ILOGB0;
/* subnormal x */
- // FIXME: scale up subnormals with a *0x1p53 or find top set bit with a better method
for (e = -0x3ff; u.bits < (uint64_t)1<<63; e--, u.bits<<=1);
return e;
}
double ldexp(double x, int n)
float ldexpf(float x, int n)
long double ldexpl(long double x, int n)
@@ -1,4 +1,6 @@
+
long long llrintl(long double x)
long long llroundl(long double x)
long lrintl(long double x)
long lroundl(long double x)
@@ -1,5 +1,5 @@
#include <fenv.h>
/*
rint may raise inexact (and it should not alter the fenv otherwise)
float nearbyintf(float x) {
fenv_t e;
long double nearbyintl(long double x)
@@ -11,6 +11,7 @@
*/
#include "libm.h"
double nexttoward(double x, long double y)
long double nexttowardl(long double x, long double y)
long double remainderl(long double x, long double y)
@@ -25,7 +25,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
double round(double x)
float roundf(float x)
@@ -25,7 +25,9 @@
long double roundl(long double x)
@@ -15,7 +15,7 @@
* should use scalbn() instead.
double scalb(double x, double fn)
@@ -13,7 +13,7 @@
* ====================================================
float scalbf(float x, float fn)
#include <limits.h>
double scalbln(double x, long n)
float scalblnf(float x, long n)
@@ -1,5 +1,6 @@
long double scalblnl(long double x, long n)