summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b7d0012)
raw | patch | inline | side by side (parent: b7d0012)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Thu, 10 Aug 2006 07:46:22 +0000 (07:46 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Thu, 10 Aug 2006 07:46:22 +0000 (07:46 +0000) |
program/acinclude.m4 | patch | blob | history |
diff --git a/program/acinclude.m4 b/program/acinclude.m4
index a4c7d2284c6491fae84be0c368fd36b45f3820a0..d0f8c0e81670e1a34f98dd9cadda9ec9d8ff1fb7 100644 (file)
--- a/program/acinclude.m4
+++ b/program/acinclude.m4
#include <stdio.h>
int main(void){
- double nan,inf,c,zero;
+ double rrdnan,rrdinf,rrdc,rrdzero;
$4;
/* some math to see if we get a floating point exception */
- zero=sin(0.0); /* don't let the compiler optimize us away */
- nan=0.0/zero; /* especially here */
- inf=1.0/zero; /* and here. I want to know if it can do the magic */
+ rrdzero=sin(0.0); /* don't let the compiler optimize us away */
+ rrdnan=0.0/rrdzero; /* especially here */
+ rrdinf=1.0/rrdzero; /* and here. I want to know if it can do the magic */
/* at run time without sig fpe */
- c = inf + nan;
- c = inf / nan;
- if (! isnan(nan)) {printf ("not isnan(NaN) ... "); return 1;}
- if (nan == nan) {printf ("nan == nan ... "); return 1;}
- if (! isinf(inf)) {printf ("not isinf(oo) ... "); return 1;}
- if (! isinf(-inf)) {printf ("not isinf(-oo) ... "); return 1;}
- if (! inf > 0) {printf ("not inf > 0 ... "); return 1;}
- if (! -inf < 0) {printf ("not -inf < 0 ... "); return 1;}
+ rrdc = rrdinf + rrdnan;
+ rrdc = rrdinf / rrdnan;
+ if (! isnan(rrdnan)) {printf ("not isnan(NaN) ... "); return 1;}
+ if (rrdnan == rrdnan) {printf ("nan == nan ... "); return 1;}
+ if (! isinf(rrdinf)) {printf ("not isinf(oo) ... "); return 1;}
+ if (! isinf(-rrdinf)) {printf ("not isinf(-oo) ... "); return 1;}
+ if (! rrdinf > 0) {printf ("not inf > 0 ... "); return 1;}
+ if (! -rrdinf < 0) {printf ("not -inf < 0 ... "); return 1;}
return 0;
}]])],[rd_cv_ieee_$2=yes],[rd_cv_ieee_$2=no],[:])])
dnl these we run regardles is cached or not