Skip to content
Snippets Groups Projects
Commit 1a631e6f authored by Fredrik Hübinette (Hubbe)'s avatar Fredrik Hübinette (Hubbe)
Browse files

frexp test updated

Rev: src/configure.in:1.91
parent 4943cae1
No related branches found
No related tags found
No related merge requests found
AC_REVISION("$Id: configure.in,v 1.90 1997/04/22 03:36:28 hubbe Exp $") AC_REVISION("$Id: configure.in,v 1.91 1997/04/22 09:18:47 hubbe Exp $")
AC_INIT(interpret.c) AC_INIT(interpret.c)
AC_CONFIG_HEADER(machine.h) AC_CONFIG_HEADER(machine.h)
...@@ -991,13 +991,16 @@ MY_CHECK_FUNCTION(frexp, ...@@ -991,13 +991,16 @@ MY_CHECK_FUNCTION(frexp,
int main() int main()
{ {
double x,y; double x,y;
int p=-7; int p,e;
x=frexp(1.0, &e);
if(x * pow(2.0,(double)e) != 1.0) exit(3)
p=-7;
for(x=3.0/4.0*pow(2.0,(double)p);x<50000.0;x*=2.0,p++) for(x=3.0/4.0*pow(2.0,(double)p);x<50000.0;x*=2.0,p++)
{ {
int e;
if(frexp(x, &e)!=3.0/4.0) exit(1); if(frexp(x, &e)!=3.0/4.0) exit(1);
if(e!=p) exit(1); if(e!=p) exit(2);
} }
exit(0); exit(0);
}]) }])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment