T#include <math.h>
Tint main(int argc, char **argv)
T{
T if(!finite(1.0))
T        return 1;
T return 0;
T}
H
H extern "C" int finite(double);
H
C
C#include <string.h>
C extern "C" int finite(double x)
C {
C  UNTESTED!
C  const int tmp = 1;
C  int be = ((const char *)tmp)[0] == 1;
C  const char binf[8] = {'\x7f', '\xf8', 0, 0, 0, 0, 0, 0};
C  const char sinf[8] = {0, 0, 0, 0, 0, 0, '\xf0', '\x7f'};
C  return be ? memcmp(&x, binf, 8)==0 : memcmp(&x, sinf, 8)==0;
C }
ENDEND
fi
