| 2104 | } |
| 2105 | |
| 2106 | floatx80 floatx80_round_to_float64( floatx80 a, float_status *status ) |
| 2107 | { |
| 2108 | flag aSign; |
| 2109 | int32_t aExp; |
| 2110 | uint64_t aSig; |
| 2111 | |
| 2112 | aSign = extractFloatx80Sign( a ); |
| 2113 | aSig = extractFloatx80Frac( a ); |
| 2114 | aExp = extractFloatx80Exp( a ); |
| 2115 | |
| 2116 | if ( aExp == 0x7FFF ) { |
| 2117 | if ( (uint64_t) ( aSig<<1 ) ) return propagateFloatx80NaNOneArg( a, status ); |
| 2118 | return a; |
| 2119 | } |
| 2120 | if ( aExp == 0 ) { |
| 2121 | if ( aSig == 0 ) return a; |
| 2122 | normalizeFloatx80Subnormal( aSig, &aExp, &aSig ); |
| 2123 | } |
| 2124 | |
| 2125 | return roundAndPackFloatx80( 64, aSign, aExp, aSig, 0, status ); |
| 2126 | } |
| 2127 | |
| 2128 | |
| 2129 | floatx80 floatx80_normalize( floatx80 a ) |
no test coverage detected