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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.17.0/] [newlib/] [libm/] [common/] [s_fmax.c] - Blame information for rev 326

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 148 jeremybenn
/* 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
#ifndef _DOUBLE_IS_32BITS
10
 
11
#ifdef __STDC__
12
        double fmax(double x, double y)
13
#else
14
        double fmax(x,y)
15
        double x;
16
        double y;
17
#endif
18
{
19
  if (__fpclassifyd(x) == FP_NAN)
20
    return y;
21
  if (__fpclassifyd(y) == FP_NAN)
22
    return x;
23
 
24
  return x > y ? x : y;
25
}
26
 
27
#endif /* _DOUBLE_IS_32BITS */

powered by: WebSVN 2.1.0

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