Branch Coverage

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


line true false branch
371 19290 5286 if ($val > 0)
392 14 44 if (is_InfD64($_[0]) or not $_[0])
401 0 0 if (is_InfD64($_[0]) or not $_[0]) { }
409 359 47371 if (is_NaND64($_[0]) or is_InfD64($_[0]) or is_ZeroD64($_[0]))
411 23505 23866 if ($exp >= 0)
413 23858 8 if $man =~ /^\-/
414 23851 15 if (-$exp >= $man_length)
416 23850 1 if ($_[0] < $z)
437 1 509412 unless (@_)
439 2 509410 if (@_ > 3)
447 509399 11 if (not ref $_[0] and $_[0] eq "Math::Decimal64")
449 10 509389 unless (@_)
454 1 509399 if (@_ > 2)
456 509266 133 if (@_ == 2)
461 13 120 if ($type == 1)
465 16 104 if ($type == 2)
469 3 101 if ($type == 3)
473 73 28 if ($type == 4)
474 0 73 if have_strtod64()
478 25 3 if ($type == 64)
491 35 178533 unless defined $ret2
492 905 177663 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 546898 if @_ != 2
536 1 546897 if $arg1 =~ /[^0-9\-\+]/
537 0 546897 if $arg2 =~ /[^0-9\-\+]/
541 185063 361834 $arg1 =~ s/^\-// ? :
545 222488 324409 if ($len_1 >= 16 or $arg2 < -398)
546 1 222487 if $len_1 > 16
548 3470 219017 if $arg2 < -398
551 0 222487 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 442 660 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 547 555 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 182285 if $len != 64
683 0 44 if d64_bytes($d64) =~ /E56$/i
684 44 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 180749 if length $keep != 64
776 102302 78447 substr($keep, 0, 1) ? :
777 13 180736 if substr($keep, 1, 5) eq 11111
778 25 180711 if (substr($keep, 1, 5) eq 11110)
780 112525 8899 if ($pre eq "00" or $pre eq "01" or $pre eq 10)
784 914 170898 if (not $mantissa =~ /[1-9]/) { }
794 8539 0 if ($pre eq 1100 or $pre eq 1101 or $pre eq 1110)
798 0 8899 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 1455 81 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 146 234 if $e >= 0
1034 114 120 if ($len != length $m)
1038 87 147 if ($len + $e > 0)
1042 126 21 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)