zoicheck.c 369 B

12345678910111213141516
  1. /*
  2. * Copyright (C) 2000 Manuel Novoa III
  3. *
  4. * This is a utility routine for strtod errno support.
  5. * As the name implies, it checks if a double is either 0 or +/-infinity.
  6. * Doing this inline doesn't work on i386 because of excess precission
  7. * stored in the FPU.
  8. *
  9. * TODO: Check bitmasks directly?
  10. */
  11. int _zero_or_inf_check(double x)
  12. {
  13. return ( x == x/4 );
  14. }