OpenCores
URL https://opencores.org/ocsvn/scarts/scarts/trunk

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-newlib/] [newlib-1.17.0/] [newlib/] [libm/] [machine/] [spu/] [sf_fpclassify.c] - Blame information for rev 9

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 9 jlechner
/* Copyright (C) 2002 by  Red Hat, Incorporated. All rights reserved.
2
 *
3
 * Permission to use, copy, modify, and distribute this software
4
 * is freely granted, provided that this notice is preserved.
5
 */
6
 
7
#include "fdlibm.h"
8
 
9
/*
10
 * On the SPU, single precision floating point returns only FP_NORMAL and
11
 * FP_ZERO, since FP_NAN, FP_INFINITE, and FP_SUBNORMAL are not
12
 * supported, base on the common f_fpclassify.c.
13
 */
14
int
15
__fpclassifyf (float x)
16
{
17
  __uint32_t w;
18
 
19
  GET_FLOAT_WORD(w,x);
20
 
21
  if (w == 0x00000000 || w == 0x80000000)
22
    return FP_ZERO;
23
  return FP_NORMAL;
24
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.