bool overflow = FALSE;
if (v0[precis + 1] < 0x8) {
/* Round down, nothing to do. */
- } else if (v[precis + 1] > 0x8) {
+ } else if (v0[precis + 1] > 0x8) {
/* Round up. */
- v0[precis + 1]++;
- overflow = v0[precis + 1] > 0xF;
- v0[precis + 1] &= 0xF;
- } else { /* v[precis + 1] == 0x8 */
+ v0[precis]++;
+ overflow = v0[precis] > 0xF;
+ v0[precis] &= 0xF;
+ } else { /* v0[precis] == 0x8 */
/* Half-point: round towards the one
* with the even least-significant digit:
* 08 -> 0 88 -> 8
[ '3e-323', '%.4a', '0x1.8000p-1072' ],
[ '3e-324', '%.4a', '0x1.0000p-1074' ],
[ '3e-320', '%.1a', '0x1.8p-1062' ],
- [ '3e-321', '%.1a', '0x1.2p-1065' ],
+ [ '3e-321', '%.1a', '0x1.3p-1065' ],
[ '3e-322', '%.1a', '0x1.ep-1069' ],
[ '3e-323', '%.1a', '0x1.8p-1072' ],
[ '3e-324', '%.1a', '0x1.0p-1074' ],