source: soft/giet_vm/giet_libs/math/s_fabs.c @ 755

Last change on this file since 755 was 581, checked in by laurent, 10 years ago

Adding ocean application, some mathematics functions and distributed locks

File size: 663 bytes
Line 
1/*
2 * ====================================================
3 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
4 *
5 * Developed at SunPro, a Sun Microsystems, Inc. business.
6 * Permission to use, copy, modify, and distribute this
7 * software is freely granted, provided that this notice
8 * is preserved.
9 * ====================================================
10 */
11
12/* Modified for GIET-VM static OS at UPMC, France 2015.
13 */
14
15/*
16 * fabs(x) returns the absolute value of x.
17 */
18
19#include "../math.h"
20#include "math_private.h"
21
22double fabs(double x)
23{
24        u_int32_t high;
25        GET_HIGH_WORD(high,x);
26        SET_HIGH_WORD(x,high&0x7fffffff);
27        return x;
28}
29
Note: See TracBrowser for help on using the repository browser.