Branch Coverage

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


line true false branch
371 19271 5305 if ($val > 0)
392 14 44 if (is_InfD64($_[0]) or not $_[0])
401 0 0 if (is_InfD64($_[0]) or not $_[0]) { }
409 339 47391 if (is_NaND64($_[0]) or is_InfD64($_[0]) or is_ZeroD64($_[0]))
411 23512 23879 if ($exp >= 0)
413 23871 8 if $man =~ /^\-/
414 23864 15 if (-$exp >= $man_length)
416 23863 1 if ($_[0] < $z)
437 1 509411 unless (@_)
439 2 509409 if (@_ > 3)
447 509398 11 if (not ref $_[0] and $_[0] eq 'Math::Decimal64')
449 10 509388 unless (@_)
454 1 509398 if (@_ > 2)
456 509266 132 if (@_ == 2)
461 13 119 if ($type == 1)
465 15 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 178553 unless defined $ret2
492 889 177699 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 546881 if @_ != 2
536 1 546880 if $arg1 =~ /[^0-9\-\+]/
537 0 546880 if $arg2 =~ /[^0-9\-\+]/
541 185063 361817 $arg1 =~ s/^\-// ? :
545 222466 324414 if ($len_1 >= 16 or $arg2 < -398)
546 1 222465 if $len_1 > 16
548 3470 218995 if $arg2 < -398
551 0 222465 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 454 648 if substr($rounder, 0, 1) > 5
589 113 8 if substr($rounder, 0, 1) == 5 and substr($rounder, 1) =~ /[1-9]/ || substr($man, -1, 1) % 2 == 1
592 567 535 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 182305 if $len != 64
683 0 43 if d64_bytes($d64) =~ /E56$/i
684 43 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 180769 if length $keep != 64
776 102314 78455 substr($keep, 0, 1) ? :
777 13 180756 if substr($keep, 1, 5) eq '11111'
778 25 180731 if (substr($keep, 1, 5) eq '11110')
780 112373 9079 if ($pre eq '00' or $pre eq '01' or $pre eq '10')
784 900 170752 if (not $mantissa =~ /[1-9]/) { }
794 8711 0 if ($pre eq '1100' or $pre eq '1101' or $pre eq '1110')
798 0 9079 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 1469 67 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 149 231 if $e >= 0
1034 115 116 if ($len != length $m)
1038 87 144 if ($len + $e > 0)
1042 126 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')