mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 06:15:21 +00:00
also start prefering NtDll API. so far: * NtQueryInformationFile * NtClose adds a performance workaround for windows unicode conversion. but that should probably be removed before merging
14 lines
242 B
C
14 lines
242 B
C
#include <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;
|
|
}
|