mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 08:12:28 +00:00
Improve documentation
The Cosmo API documentation page is pretty good now https://justine.lol/cosmopolitan/documentation.html
This commit is contained in:
parent
13437dd19b
commit
1bc3a25505
367 changed files with 2542 additions and 26178 deletions
10
third_party/compiler_rt/comparetf2.c
vendored
10
third_party/compiler_rt/comparetf2.c
vendored
|
@ -52,18 +52,14 @@ enum LE_RESULT {
|
|||
};
|
||||
|
||||
COMPILER_RT_ABI enum LE_RESULT __letf2(fp_t a, fp_t b) {
|
||||
|
||||
const srep_t aInt = toRep(a);
|
||||
const srep_t bInt = toRep(b);
|
||||
const rep_t aAbs = aInt & absMask;
|
||||
const rep_t bAbs = bInt & absMask;
|
||||
|
||||
// If either a or b is NaN, they are unordered.
|
||||
if (aAbs > infRep || bAbs > infRep) return LE_UNORDERED;
|
||||
|
||||
// If a and b are both zeros, they are equal.
|
||||
if ((aAbs | bAbs) == 0) return LE_EQUAL;
|
||||
|
||||
// If at least one of a and b is positive, we get the same result comparing
|
||||
// a and b as signed integers as we would with a floating-point compare.
|
||||
if ((aInt & bInt) >= 0) {
|
||||
|
@ -82,10 +78,10 @@ COMPILER_RT_ABI enum LE_RESULT __letf2(fp_t a, fp_t b) {
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(__ELF__)
|
||||
// Alias for libgcc compatibility
|
||||
FNALIAS(__cmptf2, __letf2);
|
||||
#endif
|
||||
COMPILER_RT_ABI enum LE_RESULT __cmptf2(fp_t a, fp_t b) {
|
||||
return __letf2(a, b);
|
||||
}
|
||||
|
||||
enum GE_RESULT {
|
||||
GE_LESS = -1,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue