fix -Wsign-compare issue
This commit is contained in:
parent
8b4f8868b3
commit
2e51a772b3
@ -15,7 +15,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBM_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: e_jnf.c,v 1.9 2002/05/26 22:01:50 wiz Exp $");
|
||||
__RCSID("$NetBSD: e_jnf.c,v 1.10 2009/01/19 05:58:27 lukem Exp $");
|
||||
#endif
|
||||
|
||||
#include "math.h"
|
||||
@ -189,7 +189,7 @@ __ieee754_ynf(int n, float x)
|
||||
b = __ieee754_y1f(x);
|
||||
/* quit if b is -inf */
|
||||
GET_FLOAT_WORD(ib,b);
|
||||
for(i=1;i<n&&ib!=0xff800000;i++){
|
||||
for(i=1;i<n&&(uint32_t)ib!=0xff800000;i++){
|
||||
temp = b;
|
||||
b = ((float)(i+i)/x)*b - a;
|
||||
GET_FLOAT_WORD(ib,b);
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBM_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: e_pow.c,v 1.14 2008/04/25 22:21:53 christos Exp $");
|
||||
__RCSID("$NetBSD: e_pow.c,v 1.15 2009/01/19 06:41:13 lukem Exp $");
|
||||
#endif
|
||||
|
||||
/* __ieee754_pow(x,y) return x**y
|
||||
@ -129,7 +129,7 @@ __ieee754_pow(double x, double y)
|
||||
k = (iy>>20)-0x3ff; /* exponent */
|
||||
if(k>20) {
|
||||
j = ly>>(52-k);
|
||||
if((j<<(52-k))==ly) yisint = 2-(j&1);
|
||||
if((uint32_t)(j<<(52-k))==ly) yisint = 2-(j&1);
|
||||
} else if(ly==0) {
|
||||
j = iy>>(20-k);
|
||||
if((j<<(20-k))==iy) yisint = 2-(j&1);
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBM_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: e_powf.c,v 1.13 2008/04/25 22:21:53 christos Exp $");
|
||||
__RCSID("$NetBSD: e_powf.c,v 1.14 2009/01/19 05:59:06 lukem Exp $");
|
||||
#endif
|
||||
|
||||
#include "math.h"
|
||||
@ -208,7 +208,7 @@ __ieee754_powf(float x, float y)
|
||||
else if (j==0x43000000) { /* if z == 128 */
|
||||
if(p_l+ovt>z-p_h) return s*huge*huge; /* overflow */
|
||||
}
|
||||
else if (j==0xc3160000){ /* z == -150 */
|
||||
else if ((uint32_t)j==0xc3160000){ /* z == -150 */
|
||||
if(p_l<=z-p_h) return s*tiny*tiny; /* underflow */
|
||||
}
|
||||
else if ((j&0x7fffffff)>0x43160000) /* z <= -150 */
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBM_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: e_rem_pio2f.c,v 1.8 2002/05/26 22:01:52 wiz Exp $");
|
||||
__RCSID("$NetBSD: e_rem_pio2f.c,v 1.9 2009/01/19 06:00:30 lukem Exp $");
|
||||
#endif
|
||||
|
||||
/* __ieee754_rem_pio2f(x,y)
|
||||
@ -130,7 +130,7 @@ __ieee754_rem_pio2f(float x, float *y)
|
||||
fn = (float)n;
|
||||
r = t-fn*pio2_1;
|
||||
w = fn*pio2_1t; /* 1st round good to 40 bit */
|
||||
if(n<32&&(ix&0xffffff00)!=npio2_hw[n-1]) {
|
||||
if(n<32&&(int32_t)(ix&0xffffff00)!=npio2_hw[n-1]) {
|
||||
y[0] = r-w; /* quick check no cancellation */
|
||||
} else {
|
||||
u_int32_t high;
|
||||
|
Loading…
Reference in New Issue
Block a user