Branch Coverage

blib/lib/Math/Polynomial.pm
Criterion Covered Total %
branch 261 270 96.6


line true false branch
99 7 5747 unless (ref $that and eval { do { $that->isa('Math::Polynomial') } })
102 2 5752 if ($reversed)
116 1 293 if $reversed
125 2 1097 unless eval { do { BEGIN {${^WARNING_BITS} = "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0f"} $arg == abs int $arg } }
139 10224 245 if ($class) { }
143 243 2 @coeff ? :
164 2 272 if defined $max_degree and $degree > $max_degree
166 261 11 if (ref $this) { }
167 253 8 unless (defined $coeff)
173 4 7 unless (defined $coeff)
183 2 1 @roots ? :
2 3 ref $this ? :
194 35 25 if (ref $this) { }
195 4 31 if ($have_arg) { }
203 6 19 if ($have_arg) { }
216 3 89 if (not ref $xvalues && ref $yvalues or @{$xvalues;} != @{$yvalues;})
221 2 87 unless @{$xvalues;}
229 1 259 if $zero == $dx
240 50011 8145 if (defined $degree)
242 49973 38 0 <= $degree && $degree < @{$this->[0];} ? :
246 1 8144 unless wantarray
252 1 10 unless wantarray
253 4 6 $this->is_zero ? :
263 1 1 0 <= $degree ? :
275 249 14 0 <= $i ? :
285 3 1 0 <= $i ? :
294 2 3 if $that->degree <= 0
299 1 6 if $r->degree > 0
308 19 28 $i++ & 1 ? :
355 2 6 if $this->degree < 0
363 135 45 $this_d <= $that_d ? :
375 889 410 $this_d <= $that_d ? :
386 226 3106 if $this_d < 0
390 8008 4157 $_ <= $this_d ? :
2 3104 $that_d < 0 ? :
403 12 3387 unless @den
405 2959 428 if ($that->is_monic)
413 922 6363 if (defined $hd)
427 1 567 unless wantarray
429 560 5 @{$quot;} ? :
441 2127 575 @{$quot;} ? :
447 2 8 unless @den
449 1 7 if ($that->is_monic)
456 7 2 if (defined $hd)
471 2 6 if $this->is_zero
473 16 6 $i++ ? :
478 1 164 if $this->is_zero
480 1942 164 $i++ ? :
490 1 118 if $this->coeff_zero == $divisor
502 3 15 $i < 0 ? :
513 1 6 unless wantarray
521 3 9 if ($check and $this->coeff_zero != $rem)
535 3 4 if $this->is_zero or $this->is_monic
543 6 12 if 0 == $exp
544 3 9 if 0 > $degree
545 3 6 if 0 == $degree
546 1 5 if defined $max_degree and $degree * $exp > $max_degree
556 2 2 if pop @binary
566 3 129 if 0 == $that->degree
567 5 124 if 0 == $exp
568 2 122 if 0 > $this_d
569 14 108 if 0 == $this_d
578 329 152 if pop @binary
587 6 93 if 0 == $this->degree
588 2 91 if 0 == $exp
597 166 180 if (pop @binary)
609 1 449 if defined $max_degree and $this->degree + $exp > $max_degree
611 2 447 unless $exp
618 2 3 unless $exp
625 6 6 if $degree <= 0
627 1 5 if defined $max_degree and $degree * $exp > $max_degree
629 1 4 unless $exp
631 1 3 unless @zeroes
639 2 7 unless $exp
640 3 4 if $exp <= 1
642 2 2 if $degree <= 0
646 5 1 !$c ? :
5 6 !($_ % $exp) ? :
656 34 15 if ($degree <= $end)
657 2 32 if 0 == $start
677 5 2 unless (defined $const)
685 3 28 $zero == $c ? :
698 54 45 unless $config->{'fold_sign'}
703 4 41 defined $sgn ? :
710 17 58 unless $params or $this->string_config
713 24 51 if ($max_exp < 0)
721 25 50 $config{'ascending'} ? :
725 43 81 if ($with_variable and $exp < $max_exp and $config{'fold_zero'} and $coeff == $zero)
735 17 148 if ($ltz and &$ltz($coeff)) { }
737 5 12 '' eq $result ? :
740 70 78 '' eq $result ? :
744 91 52 if (not $with_variable && $config{'fold_one'} or 0 == $exp and $config{'fold_exp_zero'} or $one != $coeff)
751 14 99 unless $with_variable
752 44 55 if (0 != $exp or not $config{'fold_exp_zero'})
758 96 55 if (0 != $exp or not $config{'fold_exp_zero'})
760 52 44 if (1 != $exp or not $config{'fold_exp_one'})
775 1 11 if ($exp < 0)
782 3 9 if ($first_is_neg)
787 3 9 $exp && $this->coeff_one == $coeff ? :
790 2 10 $var_is_dynamic ? :
793 6 12 if ($is_sum)
796 6 12 if ($var_is_dynamic)
800 8 10 if ($config{'expand_power'}) { }
807 2 8 if $skip > $exp
810 8 2 if ($skip)
812 6 2 if 0 <= $exp
813 7 1 if 1 < $skip
818 15 3 defined $result ? :
819 2 16 if ($first_is_neg)
823 12 6 if ($is_sum)
825 4 8 if ($is_neg)
829 4 8 $is_neg ? :
832 1 11 if ($first_is_neg)
842 1 11 if ($exp < 0)
850 2 10 $var_is_dynamic ? :
855 12 22 if defined $result and $zero == $coeff
859 12 10 if (0 != $exp)
860 3 9 if ($var_is_dynamic)
864 9 3 if (1 != $exp)
865 2 7 if ($config{'expand_power'}) { }
868 1 1 if ($var_is_dynamic)
882 7 15 if ($is_neg)
885 16 6 if (0 == $exp or $one != $coeff)
887 10 6 0 == $exp ? :
891 10 12 if (defined $result) { }
892 2 8 $is_neg ? :
895 5 7 $is_neg ? :
906 3 0 unless defined $mod
908 0 3 unless $mod_op
910 3 0 if ($this_d < $that_d)
917 0 6 unless $this_d > $that_d
924 0 224 unless wantarray
926 0 224 if ($this->degree < $that->degree)
944 0 0 unless $that->is_equal($gcd)
952 0 112 if $that->is_zero or $d2->is_zero