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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [newlib-1.18.0/] [newlib-1.18.0-or32-1.0rc1/] [newlib/] [libm/] [mathfp/] [s_ispos.c] - Diff between revs 207 and 345

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 207 Rev 345
 
 
/* @(#)z_ispos.c 1.0 98/08/13 */
/* @(#)z_ispos.c 1.0 98/08/13 */
/******************************************************************
/******************************************************************
 * Numtest
 * Numtest
 *
 *
 * Input:
 * Input:
 *   x - pointer to a floating point value
 *   x - pointer to a floating point value
 *
 *
 * Output:
 * Output:
 *   An integer that indicates if the number is positive.
 *   An integer that indicates if the number is positive.
 *
 *
 * Description:
 * Description:
 *   This routine returns an integer that indicates if the number
 *   This routine returns an integer that indicates if the number
 *   passed in is positive (1) or negative (0).
 *   passed in is positive (1) or negative (0).
 *
 *
 *****************************************************************/
 *****************************************************************/
 
 
#include "fdlibm.h"
#include "fdlibm.h"
#include "zmath.h"
#include "zmath.h"
 
 
#ifndef _DOUBLE_IS_32BITS
#ifndef _DOUBLE_IS_32BITS
 
 
int ispos (double x)
int ispos (double x)
{
{
  __uint32_t hx;
  __uint32_t hx;
 
 
  GET_HIGH_WORD (hx, x);
  GET_HIGH_WORD (hx, x);
 
 
  if (hx & 0x80000000)
  if (hx & 0x80000000)
    return (0);
    return (0);
  else
  else
    return (1);
    return (1);
}
}
 
 
#endif /* _DOUBLE_IS_32BITS */
#endif /* _DOUBLE_IS_32BITS */
 
 

powered by: WebSVN 2.1.0

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