MCPcopy Create free account
hub / github.com/coreutils/coreutils / nan_compare

Function nan_compare

src/sort.c:2117–2124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2115}
2116
2117static int
2118nan_compare (long double a, long double b)
2119{
2120 char buf[2][sizeof "-nan""()" + CHAR_BIT * sizeof a];
2121 snprintf (buf[0], sizeof buf[0], "%Lf", a);
2122 snprintf (buf[1], sizeof buf[1], "%Lf", b);
2123 return strcmp (buf[0], buf[1]);
2124}
2125
2126static int
2127general_numcompare (char const *sa, char const *sb)

Callers 1

general_numcompareFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected