repo.or.cz
/
musl.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
sys/stat.h: fix typo in statx member name stx_dio_offset_align
[musl.git]
/
src
/
math
/
fmax.c
blob
94f0caa17751b63d46e6826d37e63923dc468484
1
#include <math.h>
2
3
double
fmax
(
double
x
,
double
y
)
4
{
5
if
(
isnan
(
x
))
6
return
y
;
7
if
(
isnan
(
y
))
8
return
x
;
9
/* handle signed zeros, see C99 Annex F.9.9.2 */
10
if
(
signbit
(
x
) !=
signbit
(
y
))
11
return
signbit
(
x
) ?
y
:
x
;
12
return
x
<
y
?
y
:
x
;
13
}