Add assert statements

This commit is contained in:
Erik Schnetter 2014-09-22 16:18:53 -04:00
parent 9c8e061ab1
commit 2b7040952e
4 changed files with 16 additions and 0 deletions

View File

@ -11,6 +11,8 @@
* ====================================================
*/
#include <assert.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_j0.c,v 1.9 2008/02/22 02:30:35 das Exp $");
@ -276,6 +278,7 @@ static const double pS2[5] = {
int32_t ix;
GET_HIGH_WORD(ix,x);
ix &= 0x7fffffff;
assert(ix>=0x40000000 && ix<=0x48000000);
if(ix>=0x40200000) {p = pR8; q= pS8;}
else if(ix>=0x40122E8B){p = pR5; q= pS5;}
else if(ix>=0x4006DB6D){p = pR3; q= pS3;}
@ -372,6 +375,7 @@ static const double qS2[6] = {
int32_t ix;
GET_HIGH_WORD(ix,x);
ix &= 0x7fffffff;
assert(ix>=0x40000000 && ix<=0x48000000);
if(ix>=0x40200000) {p = qR8; q= qS8;}
else if(ix>=0x40122E8B){p = qR5; q= qS5;}
else if(ix>=0x4006DB6D){p = qR3; q= qS3;}

View File

@ -13,6 +13,8 @@
* ====================================================
*/
#include <assert.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_j0f.c,v 1.8 2008/02/22 02:30:35 das Exp $");
@ -232,6 +234,7 @@ static const float pS2[5] = {
int32_t ix;
GET_FLOAT_WORD(ix,x);
ix &= 0x7fffffff;
assert(ix>=0x40000000 && ix<=0x48000000);
if(ix>=0x41000000) {p = pR8; q= pS8;}
else if(ix>=0x40f71c58){p = pR5; q= pS5;}
else if(ix>=0x4036db68){p = pR3; q= pS3;}
@ -328,6 +331,7 @@ static const float qS2[6] = {
int32_t ix;
GET_FLOAT_WORD(ix,x);
ix &= 0x7fffffff;
assert(ix>=0x40000000 && ix<=0x48000000);
if(ix>=0x41000000) {p = qR8; q= qS8;}
else if(ix>=0x40f71c58){p = qR5; q= qS5;}
else if(ix>=0x4036db68){p = qR3; q= qS3;}

View File

@ -11,6 +11,8 @@
* ====================================================
*/
#include <assert.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_j1.c,v 1.9 2008/02/22 02:30:35 das Exp $");
@ -270,6 +272,7 @@ static const double ps2[5] = {
int32_t ix;
GET_HIGH_WORD(ix,x);
ix &= 0x7fffffff;
assert(ix>=0x40000000 && ix<=0x48000000);
if(ix>=0x40200000) {p = pr8; q= ps8;}
else if(ix>=0x40122E8B){p = pr5; q= ps5;}
else if(ix>=0x4006DB6D){p = pr3; q= ps3;}
@ -367,6 +370,7 @@ static const double qs2[6] = {
int32_t ix;
GET_HIGH_WORD(ix,x);
ix &= 0x7fffffff;
assert(ix>=0x40000000 && ix<=0x48000000);
if(ix>=0x40200000) {p = qr8; q= qs8;}
else if(ix>=0x40122E8B){p = qr5; q= qs5;}
else if(ix>=0x4006DB6D){p = qr3; q= qs3;}

View File

@ -13,6 +13,8 @@
* ====================================================
*/
#include <assert.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_j1f.c,v 1.8 2008/02/22 02:30:35 das Exp $");
@ -227,6 +229,7 @@ static const float ps2[5] = {
int32_t ix;
GET_FLOAT_WORD(ix,x);
ix &= 0x7fffffff;
assert(ix>=0x40000000 && ix<=0x48000000);
if(ix>=0x41000000) {p = pr8; q= ps8;}
else if(ix>=0x40f71c58){p = pr5; q= ps5;}
else if(ix>=0x4036db68){p = pr3; q= ps3;}
@ -324,6 +327,7 @@ static const float qs2[6] = {
int32_t ix;
GET_FLOAT_WORD(ix,x);
ix &= 0x7fffffff;
assert(ix>=0x40000000 && ix<=0x48000000);
if(ix>=0x40200000) {p = qr8; q= qs8;}
else if(ix>=0x40f71c58){p = qr5; q= qs5;}
else if(ix>=0x4036db68){p = qr3; q= qs3;}