Back to index

glibc  2.9
s_fpclassifyf.c File Reference
#include <math.h>
#include "math_private.h"

Go to the source code of this file.


int __fpclassifyf (float x)

Function Documentation

int __fpclassifyf ( float  x)

Definition at line 27 of file s_fpclassifyf.c.

  u_int32_t wx;
  int retval = FP_NORMAL;

  GET_FLOAT_WORD (wx, x);
  wx &= 0x7fffffff;
  if (wx == 0)
    retval = FP_ZERO;
  else if (wx < 0x800000)
    retval = FP_SUBNORMAL;
  else if (wx >= 0x7f800000)
    retval = wx > 0x7f800000 ? FP_NAN : FP_INFINITE;

  return retval;