Last change
on this file since 787 was
777,
checked in by meunier, 9 years ago
|
- Ajout de quelques fonction dans la lib math
- Déplacement de certaines fonctions de stdlib vers string
|
File size:
662 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 | |
---|
22 | double fabs(double x) |
---|
23 | { |
---|
24 | uint32_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.