repo.or.cz
/
minix.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
vm: fix a null dereference on out-of-memory
[minix.git]
/
lib
/
libc
/
arch
/
powerpc64
/
gen
/
fabs.c
blob
4cc21a901dfd35d47438ae1a62c9a821ddadfb63
1
/* $NetBSD: fabs.c,v 1.2 2006/07/05 18:07:22 ross Exp $ */
2
3
#include <math.h>
4
5
double
6
fabs
(
double
x
)
7
{
8
#ifdef _SOFT_FLOAT
9
if
(
x
<
0
)
10
x
= -
x
;
11
#else
12
__asm
volatile
(
"fabs %0,%1"
:
"=f"
(
x
) :
"f"
(
x
));
13
#endif
14
return
(
x
);
15
}