URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 158 |
Rev 816 |
/* Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved.
|
/* Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved.
|
*
|
*
|
* Permission to use, copy, modify, and distribute this software
|
* Permission to use, copy, modify, and distribute this software
|
* is freely granted, provided that this notice is preserved.
|
* is freely granted, provided that this notice is preserved.
|
*/
|
*/
|
|
|
#include "fdlibm.h"
|
#include "fdlibm.h"
|
|
|
#ifndef _DOUBLE_IS_32BITS
|
#ifndef _DOUBLE_IS_32BITS
|
|
|
#ifdef __STDC__
|
#ifdef __STDC__
|
double fmin(double x, double y)
|
double fmin(double x, double y)
|
#else
|
#else
|
double fmin(x,y)
|
double fmin(x,y)
|
double x;
|
double x;
|
double y;
|
double y;
|
#endif
|
#endif
|
{
|
{
|
if (__fpclassifyd(x) == FP_NAN)
|
if (__fpclassifyd(x) == FP_NAN)
|
return y;
|
return y;
|
if (__fpclassifyd(y) == FP_NAN)
|
if (__fpclassifyd(y) == FP_NAN)
|
return x;
|
return x;
|
|
|
return x < y ? x : y;
|
return x < y ? x : y;
|
}
|
}
|
|
|
#endif /* _DOUBLE_IS_32BITS */
|
#endif /* _DOUBLE_IS_32BITS */
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.