| ... | @@ -38,12 +38,14 @@ pub extern fn __letf2(a: f128, b: f128) c_int { | ... | @@ -38,12 +38,14 @@ pub extern fn __letf2(a: f128, b: f128) c_int { |
| 38 | | 38 | |
| 39 | // If at least one of a and b is positive, we get the same result comparing | 39 | // If at least one of a and b is positive, we get the same result comparing |
| 40 | // a and b as signed integers as we would with a floating-point compare. | 40 | // a and b as signed integers as we would with a floating-point compare. |
| 41 | return if ((aInt & bInt) >= 0) if (aInt < bInt) | 41 | return if ((aInt & bInt) >= 0) |
| 42 | LE_LESS | 42 | if (aInt < bInt) |
| 43 | else if (aInt == bInt) | 43 | LE_LESS |
| 44 | LE_EQUAL | 44 | else if (aInt == bInt) |
| | 45 | LE_EQUAL |
| | 46 | else |
| | 47 | LE_GREATER |
| 45 | else | 48 | else |
| 46 | LE_GREATER else | | |
| 47 | // Otherwise, both are negative, so we need to flip the sense of the | 49 | // Otherwise, both are negative, so we need to flip the sense of the |
| 48 | // comparison to get the correct result. (This assumes a twos- or ones- | 50 | // comparison to get the correct result. (This assumes a twos- or ones- |
| 49 | // complement integer representation; if integers are represented in a | 51 | // complement integer representation; if integers are represented in a |
| ... | @@ -73,7 +75,6 @@ pub extern fn __getf2(a: f128, b: f128) c_int { | ... | @@ -73,7 +75,6 @@ pub extern fn __getf2(a: f128, b: f128) c_int { |
| 73 | | 75 | |
| 74 | if (aAbs > infRep or bAbs > infRep) return GE_UNORDERED; | 76 | if (aAbs > infRep or bAbs > infRep) return GE_UNORDERED; |
| 75 | if ((aAbs | bAbs) == 0) return GE_EQUAL; | 77 | if ((aAbs | bAbs) == 0) return GE_EQUAL; |
| 76 | // zig fmt issue here, see https://github.com/ziglang/zig/issues/2661 | | |
| 77 | return if ((aInt & bInt) >= 0) | 78 | return if ((aInt & bInt) >= 0) |
| 78 | if (aInt < bInt) | 79 | if (aInt < bInt) |
| 79 | GE_LESS | 80 | GE_LESS |