* mingwex/math/s_erf.c (erf): Set errno to ERANGE if
beyond approximation limit. * mingwex/math/sf_erf.c (erff): Likewise.
This commit is contained in:
parent
4883801c0f
commit
672126d4f1
|
@ -1,3 +1,9 @@
|
||||||
|
2003-10-21 Danny Smith <dannysmith@users.sourceforge.net>
|
||||||
|
|
||||||
|
* mingwex/math/s_erf.c (erf): Set errno to ERANGE if
|
||||||
|
beyond approximation limit.
|
||||||
|
* mingwex/math/sf_erf.c (erff): Likewise.
|
||||||
|
|
||||||
2003-10-17 Danny Smith <dannysmith@users.sourceforge.net>
|
2003-10-17 Danny Smith <dannysmith@users.sourceforge.net>
|
||||||
|
|
||||||
* include/stdio.h (getc): Cast result to unsigned char before
|
* include/stdio.h (getc): Cast result to unsigned char before
|
||||||
|
|
|
@ -110,6 +110,7 @@
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
#define __ieee754_exp exp
|
#define __ieee754_exp exp
|
||||||
|
|
||||||
|
@ -337,6 +338,8 @@ sb7 = -2.24409524465858183362e+01; /* 0xC03670E2, 0x42712D62 */
|
||||||
__ieee754_exp((z-x)*(z+x)+R/S);
|
__ieee754_exp((z-x)*(z+x)+R/S);
|
||||||
if(hx>0) return r/x; else return two-r/x;
|
if(hx>0) return r/x; else return two-r/x;
|
||||||
} else {
|
} else {
|
||||||
|
/* set range error */
|
||||||
|
errno = ERANGE;
|
||||||
if(hx>0) return tiny*tiny; else return two-tiny;
|
if(hx>0) return tiny*tiny; else return two-tiny;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,10 +16,13 @@
|
||||||
/*
|
/*
|
||||||
#include "fdlibm.h"
|
#include "fdlibm.h"
|
||||||
*/
|
*/
|
||||||
|
#include <math.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
#define __ieee754_expf expf
|
#define __ieee754_expf expf
|
||||||
|
|
||||||
#include <math.h>
|
|
||||||
|
|
||||||
typedef union
|
typedef union
|
||||||
{
|
{
|
||||||
|
@ -254,6 +257,8 @@ sb7 = -2.2440952301e+01; /* 0xc1b38712 */
|
||||||
__ieee754_expf((z-x)*(z+x)+R/S);
|
__ieee754_expf((z-x)*(z+x)+R/S);
|
||||||
if(hx>0) return r/x; else return two-r/x;
|
if(hx>0) return r/x; else return two-r/x;
|
||||||
} else {
|
} else {
|
||||||
|
/* set range error */
|
||||||
|
errno = ERANGE;
|
||||||
if(hx>0) return tiny*tiny; else return two-tiny;
|
if(hx>0) return tiny*tiny; else return two-tiny;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue