Branch Coverage

d2fixed.c
Criterion Covered Total %
branch 110 192 57.2


line true false branch
115 0 535 assert(j >= 128);
116 0 535 assert(j <= 180);
209 0 10 while (digits >= 10000) {
222 0 10 if (digits >= 100) {
228 0 10 if (digits >= 10) {
246 30 35 while (digits >= 10000) {
259 0 35 if (digits >= 100) {
265 0 35 if (digits >= 10) {
284 15 25 for (; i < count - 1; i += 2) {
290 10 15 if (i < count) {
303 45 370 if (digits == 0) {
308 740 370 for (i = 0; i < 5; i += 4) {
351 0 0 if (mantissa) {
355 0 0 if (sign) {
379 0 35 if (ieeeExponent == ((1u << DOUBLE_EXPONENT_BITS) - 1u)) {
382 10 25 if (ieeeExponent == 0 && ieeeMantissa == 0) {
0 10 if (ieeeExponent == 0 && ieeeMantissa == 0) {
384 0 0 if (ieeeSign) {
388 0 0 if (precision > 0) {
399 10 25 if (ieeeExponent == 0) {
413 10 25 if (ieeeSign) {
416 10 25 if (e2 >= -52) {
417 0 10 const uint32_t idx = e2 < 0 ? 0 : indexForExponent((uint32_t) e2);
424 20 10 for (i = len - 1; i >= 0; --i) {
429 0 20 if (nonzero) {
432 10 10 } else if (digits != 0) {
440 25 10 if (!nonzero) {
443 35 0 if (precision > 0) {
449 35 0 if (e2 < 0) {
458 0 35 if (blocks <= MIN_BLOCK_2[idx]) {
462 10 25 } else if (i < MIN_BLOCK_2[idx]) {
467 255 0 for (; i < blocks; ++i) {
470 25 230 if (p >= POW10_OFFSET_2[idx + 1]) {
485 220 10 if (i < blocks - 1) {
491 90 10 for (k = 0; k < 9 - maximum; ++k) {
498 10 0 if (lastDigit != 5) {
504 0 0 || (requiredTwos < 60 && multipleOfPowerOf2(m2, (uint32_t) requiredTwos));
0 0 || (requiredTwos < 60 && multipleOfPowerOf2(m2, (uint32_t) requiredTwos));
0 0 || (requiredTwos < 60 && multipleOfPowerOf2(m2, (uint32_t) requiredTwos));
505 0 0 roundUp = trailingZeros ? 2 : 1;
511 0 10 if (maximum > 0) {
521 10 25 if (roundUp != 0) {
527 10 0 if (roundIndex == -1 || (c = result[roundIndex], c == '-')) {
0 10 if (roundIndex == -1 || (c = result[roundIndex], c == '-')) {
529 0 0 if (dotIndex > 0) {
536 0 10 if (c == '.') {
539 0 10 } else if (c == '9') {
544 0 10 if (roundUp == 2 && c % 2 == 0) {
0 0 if (roundUp == 2 && c % 2 == 0) {
589 0 35 if (ieeeExponent == ((1u << DOUBLE_EXPONENT_BITS) - 1u)) {
592 10 25 if (ieeeExponent == 0 && ieeeMantissa == 0) {
0 10 if (ieeeExponent == 0 && ieeeMantissa == 0) {
594 0 0 if (ieeeSign) {
598 0 0 if (precision > 0) {
610 10 25 if (ieeeExponent == 0) {
625 10 25 if (ieeeSign) {
633 10 25 if (e2 >= -52) {
634 0 10 const uint32_t idx = e2 < 0 ? 0 : indexForExponent((uint32_t) e2);
641 20 10 for (i = len - 1; i >= 0; --i) {
646 0 20 if (printedDigits != 0) {
647 0 0 if (printedDigits + 9 > precision) {
654 10 10 } else if (digits != 0) {
657 0 10 if (availableDigits > precision) {
660 10 0 if (printDecimalPoint) {
672 35 0 if (e2 < 0 && availableDigits == 0) {
35 0 if (e2 < 0 && availableDigits == 0) {
678 265 0 for (i = MIN_BLOCK_2[idx]; i < 200; ++i) {
683 265 0 digits = (p >= POW10_OFFSET_2[idx + 1]) ? 0 : mulShift_mod1e9(m2 << 8, POW10_SPLIT_2[p], j + 8);
688 230 35 if (printedDigits != 0) {
689 35 195 if (printedDigits + 9 > precision) {
696 25 10 } else if (digits != 0) {
699 0 25 if (availableDigits > precision) {
702 25 0 if (printDecimalPoint) {
720 0 35 if (availableDigits == 0) {
725 35 0 if (availableDigits > maximum) {
726 265 35 for (k = 0; k < availableDigits - maximum; ++k) {
736 25 10 if (lastDigit != 5) {
744 10 0 || (requiredTwos < 60 && multipleOfPowerOf2(m2, (uint32_t) requiredTwos));
0 10 || (requiredTwos < 60 && multipleOfPowerOf2(m2, (uint32_t) requiredTwos));
0 0 || (requiredTwos < 60 && multipleOfPowerOf2(m2, (uint32_t) requiredTwos));
745 0 10 if (rexp < 0) {
747 0 0 trailingZeros = trailingZeros && multipleOfPowerOf5(m2, (uint32_t) requiredFives);
0 0 trailingZeros = trailingZeros && multipleOfPowerOf5(m2, (uint32_t) requiredFives);
749 0 10 roundUp = trailingZeros ? 2 : 1;
755 35 0 if (printedDigits != 0) {
756 10 25 if (digits == 0) {
763 0 0 if (printDecimalPoint) {
773 10 25 if (roundUp != 0) {
778 10 0 if (roundIndex == -1 || (c = result[roundIndex], c == '-')) {
0 10 if (roundIndex == -1 || (c = result[roundIndex], c == '-')) {
783 0 10 if (c == '.') {
785 0 10 } else if (c == '9') {
790 0 10 if (roundUp == 2 && c % 2 == 0) {
0 0 if (roundUp == 2 && c % 2 == 0) {
799 25 10 if (exp < 0) {
806 10 25 if (exp >= 100) {