repo.or.cz
/
netbsd-mini2440.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Sync usage with man page.
[netbsd-mini2440.git]
/
lib
/
libc
/
arch
/
powerpc64
/
gen
/
fabs.c
blob
c1f0ee6c4f8e8edd142edb516ac454db452471df
1
/* $NetBSD: fabs.c,v 1.1 2006/07/01 16:37:20 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
}