source: trunk/libs/libmath/s_fabs.c @ 508

Last change on this file since 508 was 469, checked in by alain, 6 years ago

1) Introduce the libsemaphore library.
2) Introduce a small libmath library, required by the "fft" application..
3) Introduce the multithreaded "fft" application.
4) Fix a bad synchronisation bug in the Copy-On-Write mechanism.

File size: 682 bytes
RevLine 
[469]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/*
13 * Modified for ALMOS-MKH OS at UPMC, France, August 2018. (Alain Greiner)
14 */
15
16
17/*
18 * fabs(x) returns the absolute value of x.
19 */
20
21#include "math.h"
22#include "math_private.h"
23
24double fabs(double x)
25{
26        uint32_t high;
27        GET_HIGH_WORD(high,x);
28        SET_HIGH_WORD(x,high&0x7fffffff);
29        return x;
30}
31
Note: See TracBrowser for help on using the repository browser.