Branch Coverage

blib/lib/Math/Decimal64.pm
Criterion Covered Total %
branch 139 224 62.0


line true false branch
371 19274 5302 if ($val > 0)
392 14 44 if (is_InfD64($_[0]) or not $_[0])
401 0 0 if (is_InfD64($_[0]) or not $_[0]) { }
409 362 47368 if (is_NaND64($_[0]) or is_InfD64($_[0]) or is_ZeroD64($_[0]))
411 23499 23869 if ($exp >= 0)
413 23861 8 if $man =~ /^\-/
414 23854 15 if (-$exp >= $man_length)
416 23853 1 if ($_[0] < $z)
437 1 509369 unless (@_)
439 2 509367 if (@_ > 3)
447 509356 11 if (not ref $_[0] and $_[0] eq 'Math::Decimal64')
449 9 509347 unless (@_)
454 1 509357 if (@_ > 2)
456 509266 91 if (@_ == 2)
461 3 88 if ($type == 1)
465 5 83 if ($type == 2)
469 3 80 if ($type == 3)
473 62 18 if ($type == 4)
474 0 62 if have_strtod64()
478 15 3 if ($type == 64)
491 35 178530 unless defined $ret2
492 860 177705 if is_ZeroD64($_[0])
511 0 0 $v ge '3.23' ? :
514 0 0 if (Math::MPFR::Rmpfr_zero_p($fr) or Math::MPFR::Rmpfr_inf_p($fr) or Math::MPFR::Rmpfr_nan_p($fr))
523 0 0 if $man =~ /^\-/
532 0 546864 if @_ != 2
536 1 546863 if $arg1 =~ /[^0-9\-\+]/
537 0 546863 if $arg2 =~ /[^0-9\-\+]/
541 185063 361800 $arg1 =~ s/^\-// ? :
545 222465 324398 if ($len_1 >= 16 or $arg2 < -398)
546 1 222464 if $len_1 > 16
548 3470 218994 if $arg2 < -398
551 0 222464 if ($Math::Decimal64::Config{'longdblsize'} == 8)
553 0 0 if ($len == 16)
575 0 3470 if ($man =~ /^\-/)
583 1102 2368 if ($length >= $maxlen)
585 969 133 $length > $maxlen ? :
588 437 665 if substr($rounder, 0, 1) > 5
589 105 8 if substr($rounder, 0, 1) == 5 and substr($rounder, 1) =~ /[1-9]/ || substr($man, -1, 1) % 2 == 1
592 542 560 if $roundup
605 0 10 if @_ != 3
611 2 8 if _itsa($arg1) != 64
612 0 8 if $arg2 =~ /[^0-9\-]/
613 0 8 if $arg3 =~ /[^0-9\-]/
616 2 6 if $arg2 =~ /^\-/
618 1 7 if ($len_2 >= 16 or $arg3 < -398)
619 0 1 if $len_2 > 16
621 0 1 if $arg3 < -398
623 0 1 if ($Math::Decimal64::Config{'longdblsize'} == 8)
626 0 0 if ($arg2 =~ /^\-/)
631 0 0 if ($len_2 == 16)
650 0 0 defined $adj[1] ? :
672 0 182282 if $len != 64
683 0 42 if d64_bytes($d64) =~ /E56$/i
684 42 0 if d64_bytes($d64) =~ /AC0$/i
696 0 0 if $first[1] =~ /inf/i or $first[1] =~ /nan/i
701 0 0 if ($mantissa eq '') { }
719 0 0 if length $_[0] != 64
726 0 0 substr($keep, 0, 1) ? :
727 0 0 if substr($keep, 1, 5) eq '11111'
728 0 0 if (substr($keep, 1, 5) eq '11110')
730 0 0 if ($pre eq '00' or $pre eq '01' or $pre eq '10')
736 0 0 if ($pre eq '1100' or $pre eq '1101' or $pre eq '1110')
749 0 0 if length $_[0] != 64
770 0 180746 if length $keep != 64
776 102293 78453 substr($keep, 0, 1) ? :
777 13 180733 if substr($keep, 1, 5) eq '11111'
778 25 180708 if (substr($keep, 1, 5) eq '11110')
780 112407 9037 if ($pre eq '00' or $pre eq '01' or $pre eq '10')
784 876 170795 if (not $mantissa =~ /[1-9]/) { }
794 8663 0 if ($pre eq '1100' or $pre eq '1101' or $pre eq '1110')
798 0 9037 if (not $mantissa =~ /[1-9]/) { }
854 0 1536 if ($Math::Decimal64::fmt eq 'DPD') { }
855 0 0 if ($pre eq '00' or $pre eq '01' or $pre eq '10') { }
863 1472 64 if ($pre eq '00' or $pre eq '01' or $pre eq '10') { }
876 768 768 if hex substr(d64_bytes($_[0]), 0, 1) >= 8
902 0 0 if ($arg1 =~ /^(\-|\+)?inf|^(\-|\+)?nan/i)
912 8 8 if ($arg1 =~ /^(\-|\+)?inf|^(\-|\+)?nan/i)
925 0 0 unless defined $_[1]
928 0 0 unless defined $split[1]
949 12 0 if ($man =~ /^(\-|\+)?inf|^(\-|\+)?nan/i)
950 6 4 $man =~ /^(\-|\+)?nan/i ? :
2 10 $man =~ /\-inf/i ? :
958 0 0 $man =~ /^\-/ ? :
960 0 0 if $man =~ /[^0-9]/
966 0 0 unless $man
973 0 0 if (length $man > 16 or $exp < -398)
974 0 0 if length $man > 16
980 0 0 if $exp < -398
983 0 0 if ($exp > 369)
984 0 0 if length($man) + $exp > 385
997 0 0 if $len != 50
1004 0 0 if ($leading_digit < 8) { }
1009 0 0 $leading_digit == 8 ? :
1014 0 0 if $len != 13
1026 11 402 if is_NaND64($_[0])
1027 22 380 if (is_InfD64($_[0]))
1028 11 11 if is_InfD64($_[0]) > 0
1031 144 236 if $e >= 0
1034 117 119 if ($len != length $m)
1038 89 147 if ($len + $e > 0)
1042 129 18 if ($len + $e < 0)
1055 1 122 unless $_[1] >= 0
1058 98 24 $_[1] ? :
1062 30 92 if $str =~ /n/i
1064 8 84 unless $str =~ /\./
1069 18 66 if $_[1] == $len_trail
1071 14 52 if (length $trailing <= $_[1])
1079 18 34 if substr($trailing, $_[1], 1) <= 4 or substr($trailing, $_[1]) =~ /^5(0+)?$/ and substr($trailing, $_[1] - 1, 1) % 2 == 0
1088 10 24 if $carry eq ''
1095 12 12 if ($len_lead != length $leading)
1114 30 22 if (substr($_[0], $offset, 1) ne '0')