mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 05:42:29 +00:00
Initial import
This commit is contained in:
commit
c91b3c5006
14915 changed files with 590219 additions and 0 deletions
13
libc/math/fmaxf.c
Normal file
13
libc/math/fmaxf.c
Normal file
|
@ -0,0 +1,13 @@
|
|||
#include "libc/math/math.h"
|
||||
|
||||
float fmaxf(float x, float y)
|
||||
{
|
||||
if (isnan(x))
|
||||
return y;
|
||||
if (isnan(y))
|
||||
return x;
|
||||
/* handle signed zeroes, see C99 Annex F.9.9.2 */
|
||||
if (signbit(x) != signbit(y))
|
||||
return signbit(x) ? y : x;
|
||||
return x < y ? y : x;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue