Improve documentation
The Cosmo API documentation page is pretty good now https://justine.lol/cosmopolitan/documentation.html
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
#include "libc/math/math.h"
|
||||
|
||||
double fmax(double x, double y)
|
||||
{
|
||||
if (isnan(x))
|
||||
return y;
|
||||
if (isnan(y))
|
||||
return x;
|
||||
/* handle signed zeros, see C99 Annex F.9.9.2 */
|
||||
if (signbit(x) != signbit(y))
|
||||
return signbit(x) ? y : x;
|
||||
return x < y ? y : x;
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
#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;
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
#include "libc/math/math.h"
|
||||
|
||||
#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
|
||||
long double fmaxl(long double x, long double y)
|
||||
{
|
||||
return fmax(x, y);
|
||||
}
|
||||
#else
|
||||
long double fmaxl(long double x, long double y)
|
||||
{
|
||||
if (isnan(x))
|
||||
return y;
|
||||
if (isnan(y))
|
||||
return x;
|
||||
/* handle signed zeros, see C99 Annex F.9.9.2 */
|
||||
if (signbit(x) != signbit(y))
|
||||
return signbit(x) ? y : x;
|
||||
return x < y ? y : x;
|
||||
}
|
||||
#endif
|
||||
@@ -1,13 +0,0 @@
|
||||
#include "libc/math/math.h"
|
||||
|
||||
double fmin(double x, double y)
|
||||
{
|
||||
if (isnan(x))
|
||||
return y;
|
||||
if (isnan(y))
|
||||
return x;
|
||||
/* handle signed zeros, see C99 Annex F.9.9.2 */
|
||||
if (signbit(x) != signbit(y))
|
||||
return signbit(x) ? x : y;
|
||||
return x < y ? x : y;
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
#include "libc/math/math.h"
|
||||
|
||||
float fminf(float x, float y)
|
||||
{
|
||||
if (isnan(x))
|
||||
return y;
|
||||
if (isnan(y))
|
||||
return x;
|
||||
/* handle signed zeros, see C99 Annex F.9.9.2 */
|
||||
if (signbit(x) != signbit(y))
|
||||
return signbit(x) ? x : y;
|
||||
return x < y ? x : y;
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
#include "libc/math/math.h"
|
||||
|
||||
#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
|
||||
long double fminl(long double x, long double y)
|
||||
{
|
||||
return fmin(x, y);
|
||||
}
|
||||
#else
|
||||
long double fminl(long double x, long double y)
|
||||
{
|
||||
if (isnan(x))
|
||||
return y;
|
||||
if (isnan(y))
|
||||
return x;
|
||||
/* handle signed zeros, see C99 Annex F.9.9.2 */
|
||||
if (signbit(x) != signbit(y))
|
||||
return signbit(x) ? x : y;
|
||||
return x < y ? x : y;
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user