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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libjava/] [classpath/] [native/] [fdlibm/] [s_fabs.c] - Blame information for rev 774

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 774 jeremybenn
 
2
/* @(#)s_fabs.c 1.3 95/01/18 */
3
/*
4
 * ====================================================
5
 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
6
 *
7
 * Developed at SunSoft, a Sun Microsystems, Inc. business.
8
 * Permission to use, copy, modify, and distribute this
9
 * software is freely granted, provided that this notice
10
 * is preserved.
11
 * ====================================================
12
 */
13
 
14
/*
15
 * fabs(x) returns the absolute value of x.
16
 */
17
 
18
#include "fdlibm.h"
19
 
20
#ifndef _DOUBLE_IS_32BITS
21
 
22
#ifdef __STDC__
23
        double fabs(double x)
24
#else
25
        double fabs(x)
26
        double x;
27
#endif
28
{
29
        uint32_t hx;
30
 
31
        GET_HIGH_WORD(hx,x);
32
        SET_HIGH_WORD(x, hx & 0x7fffffff);
33
        return x;
34
}
35
 
36
#endif /* _DOUBLE_IS_32BITS */

powered by: WebSVN 2.1.0

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