Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
645 B

  1. /* _Dtest function -- IEEE 754 version */
  2. #include "xmath.h"
  3. _STD_BEGIN
  4. _CRTIMP2 short __cdecl _Dtest(double *px)
  5. { /* categorize *px */
  6. unsigned short *ps = (unsigned short *)px;
  7. if ((ps[_D0] & _DMASK) == _DMAX << _DOFF)
  8. return ((ps[_D0] & _DFRAC) != 0 || ps[_D1] != 0
  9. || ps[_D2] != 0 || ps[_D3] != 0 ? _NANCODE : _INFCODE);
  10. else if ((ps[_D0] & ~_DSIGN) != 0 || ps[_D1] != 0
  11. || ps[_D2] != 0 || ps[_D3] != 0)
  12. return (_FINITE);
  13. else
  14. return (0);
  15. }
  16. _STD_END
  17. /*
  18. * Copyright (c) 1992-2001 by P.J. Plauger. ALL RIGHTS RESERVED.
  19. * Consult your license regarding permissions and restrictions.
  20. V3.10:0009 */