]> sourceware.org Git - newlib-cygwin.git/commitdiff
* mingwex/math/s_erf.c (erf): Set errno to ERANGE if
authorDanny Smith <dannysmith@users.sourceforge.net>
Tue, 21 Oct 2003 09:05:24 +0000 (09:05 +0000)
committerDanny Smith <dannysmith@users.sourceforge.net>
Tue, 21 Oct 2003 09:05:24 +0000 (09:05 +0000)
beyond approximation limit.
* mingwex/math/sf_erf.c (erff): Likewise.

winsup/mingw/ChangeLog
winsup/mingw/mingwex/math/s_erf.c
winsup/mingw/mingwex/math/sf_erf.c

index 4d23179363a3c5acbb33709fbbd4ac2f6097de8c..a8a7aa7d8c2c1a996338ec48e79562b7a882d58a 100644 (file)
@@ -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>
 
        * include/stdio.h (getc): Cast result to unsigned char before
index 4673f48b3720a5660c0dec3e4aa2c1464eb0b0da..3cba24dd234785bea5dd355b0247479d79364470 100644 (file)
 
 #include <math.h>
 #include <stdint.h>
+#include <errno.h>
 
 #define __ieee754_exp exp
 
@@ -337,6 +338,8 @@ sb7  = -2.24409524465858183362e+01; /* 0xC03670E2, 0x42712D62 */
                        __ieee754_exp((z-x)*(z+x)+R/S);
            if(hx>0) return r/x; else return two-r/x;
        } else {
+           /* set range error */
+            errno = ERANGE;
            if(hx>0) return tiny*tiny; else return two-tiny;
        }
 }
index 20a20fc25c86887bcbb8b56451d59bf42ef3a12e..1fca80e94413d0a74d31747dbf065a3f8e8902d1 100644 (file)
 /*
 #include "fdlibm.h"
 */
+#include <math.h>
 #include <stdint.h>
+#include <errno.h>
+
 #define __ieee754_expf expf
 
-#include <math.h>
+
 
 typedef union
 {
@@ -254,6 +257,8 @@ sb7  = -2.2440952301e+01; /* 0xc1b38712 */
                        __ieee754_expf((z-x)*(z+x)+R/S);
            if(hx>0) return r/x; else return two-r/x;
        } else {
+           /* set range error */
+            errno = ERANGE;
            if(hx>0) return tiny*tiny; else return two-tiny;
        }
 }
This page took 0.035803 seconds and 5 git commands to generate.