Branch Coverage

blib/lib/Math/Algebra/Symbols/Term.pm
Criterion Covered Total %
branch 243 546 44.5


line true false branch
48 45 1012 unless $a
59 1012 0 if ($A =~ m[^\s*([+-])?(\d+)?(?:/(\d+))?(i)?(?:\*)?(.*)$])
61 160 852 if $1 and $1 eq '-'
62 770 242 if $2
63 197 815 if $c eq ''
64 45 967 if $c eq '-'
66 110 902 if $3
67 902 110 if $d eq ''
69 113 899 if $4
76 1 129 if defined $2
77 129 1 unless defined $2
80 0 1012 if $A eq $b
81 0 1012 if $b
107 738 1057 unless scalar @_
124 9732 3142 if $x == 1 or $y == 1
126 2723 419 if $y < $a
130 3142 4493 if $r == 0
146 0 0 if $x == 1 or $y == 1
170 0 21972 if $i == 1
171 0 21972 unless $i =~ /^[\+\-]?\d+/
172 443 21529 if $i > 10000000
186 8657 13585 unless @_ > 1
188 3915 9670 $_[1] == 1 ? :
202 67 13195 unless @_ > 1
204 12993 202 $_[1] == 1 ? :
218 2305 0 $_[1] ? :
221 468 1837 if ($$t{'d'} > 1)
223 323 145 if ($g > 1)
241 5362 6814 $_[1] == 1 ? :
242 0 12176 unless $d != 0
246 1810 10366 if ($g > 1)
251 34 12142 if $d < 0
279 0 0 unless exists $$t{'z'}
303 0 0 unless exists $$t{'z'}
327 0 0 unless exists $$t{'z'}
352 558 7345 unless @_ > 1
354 3016 4329 $_[1] == 1 ? :
358 0 7345 if $i4 == 2 or $i4 == 3
387 6693 2500 unless @_ > 1
417 575 3888 unless @_ > 1
447 0 4422 unless @_ > 1
462 0 1 unless @_ > 1
485 777 356 exists $$t{'v'}{$v} ? :
1133 1330 if @_ == 2
487 373 957 $_[2] == 1 ? :
488 1089 241 if $p
489 241 1089 unless $p
518 0 26904 unless $$t{'z'}
554 8337 31944 if defined $$t{'divide'}
555 421 39860 if defined $$t{'sqrt'}
556 16664 23617 if defined $$t{'exp'}
557 2 40279 if defined $$t{'log'}
558 18576 21705 if $$t{'i'} == 1
559 4424 35857 if $s eq ''
573 0 0 exists $$t{'z'} ? :
587 0 8525 unless $$a{'z'} and $$b{'z'}
590 5 8520 unless $$a{'z'} eq $$b{'z'}
591 1179 7341 if $a == $b
597 1493 5848 if $c == 0
613 0 0 unless $$a{'z'} and $$b{'z'}
616 0 0 if $a == $b
617 0 0 if $b == $zero
618 0 0 if $a == $zero
619 0 0 unless $$a{'z'} eq $$b{'z'}
640 0 9821 unless $$a{'z'} and $$b{'z'}
645 3575 5962 if defined $$a{'divide'} and defined $$b{'divide'} or defined $$a{'sqrt'} and defined $$b{'sqrt'} or defined $$a{'exp'} and defined $$b{'exp'} or defined $$a{'log'} and defined $$b{'log'}
654 150 5812 if $i == 2
662 567 420 exists $$z{'v'}{$v} ? :
667 3560 2402 unless defined $$a{'divide'}
668 5934 28 unless defined $$a{'sqrt'}
669 1979 3983 unless defined $$a{'exp'}
670 5962 0 unless defined $$a{'log'}
687 0 251 unless $$a{'z'} and $$b{'z'}
692 4 0 if defined $$b{'divide'} and !defined($$a{'divide'}) || $$a{'divide'}->id != $$b{'divide'}->id
694 17 0 if defined $$b{'sqrt'} and !defined($$a{'sqrt'}) || $$a{'sqrt'}->id != $$b{'sqrt'}->id
696 0 0 if defined $$b{'exp'} and !defined($$a{'exp'}) || $$a{'exp'}->id != $$b{'exp'}->id
698 0 0 if defined $$b{'log'} and !defined($$a{'log'}) || $$a{'log'}->id != $$b{'log'}->id
704 0 230 if $i == -1
716 0 230 if defined $$a{'divide'} and defined $$b{'divide'}
717 0 230 if defined $$a{'sqrt'} and defined $$b{'sqrt'}
718 0 230 if defined $$a{'exp'} and defined $$b{'exp'}
719 0 230 if defined $$a{'log'} and defined $$b{'log'}
737 0 0 unless $$t{'z'}
741 0 0 if $$t{'divide'} or $$t{'sqrt'} or $$t{'exp'} or $$t{'log'}
748 0 0 if $i
771 0 0 unless $$a{'z'} and $$b{'z'}
774 0 0 if $a == $one or $b == $zero
776 0 0 if $$a{'divide'} or $$a{'sqrt'} or $$a{'exp'} or $$a{'log'}
782 0 0 if $$b{'d'} != 1 or $$b{'i'} == 1 or $$b{'divide'} or $$b{'sqrt'} or $$b{'exp'} or $$b{'log'}
793 0 0 if ($p < 0)
795 0 0 unless $a
797 0 0 if $p == 1
826 0 54 unless $$t{'z'}
829 0 54 if $$t{'i'} or $$t{'divide'} or $$t{'sqrt'} or $$t{'exp'} or $$t{'log'}
837 4 50 if $c < 0
839 25 29 unless $c2 * $c2 == $c
840 0 29 unless $d2 * $d2 == $d
847 3 5 unless $p % 2 == 0
866 0 1547 unless $$t{'z'}
868 101 1446 if $t == $zero
869 0 1446 if $$t{'divide'} or $$t{'sqrt'} or $$t{'exp'} or $$t{'log'}
873 350 1096 unless $$t{'i'} == 1
874 0 51 unless $$t{'d'} == 1 or $$t{'d'} == 2 or $$t{'d'} == 4
877 1062 26 unless scalar keys %{$$t{'v'};} == 1 and exists $$t{'v'}{'pi'} and $$t{'v'}{'pi'} == 1
883 7 19 if $d == 1
886 1 25 if $c == 0
887 9 16 if $c == 1
888 6 10 if $c == 2
889 10 0 if $c == 3
903 0 120 unless $$t{'z'}
905 3 117 if $t == $zero
906 0 117 if $$t{'divide'} or $$t{'sqrt'} or $$t{'exp'} or $$t{'log'}
910 4 113 unless $$t{'i'} == 0
911 2 111 unless scalar keys %{$$t{'v'};} == 1
912 91 20 unless exists $$t{'v'}{'pi'}
913 0 20 unless $$t{'v'}{'pi'} == 1
917 0 8 unless $d == 1 or $d == 2 or $d == 3 or $d == 6
918 6 14 if $d == 1
919 6 14 if $d == 2
920 0 20 if $d == 3
923 3 17 if $c == 0
924 2 15 if $c == 1
925 0 15 if $c == 2
926 3 12 if $c == 3
927 0 12 if $c == 4
928 2 10 if $c == 5
929 3 7 if $c == 6
930 2 5 if $c == 7
931 0 5 if $c == 8
932 3 2 if $c == 9
933 0 2 if $c == 10
934 2 0 if $c == 11
935 0 0 if $c == 12
949 0 125 unless $$t{'z'}
951 3 122 if $t == $zero
952 0 122 if $$t{'divide'} or $$t{'sqrt'} or $$t{'exp'} or $$t{'log'}
956 4 118 unless $$t{'i'} == 0
957 2 116 unless scalar keys %{$$t{'v'};} == 1
958 96 20 unless exists $$t{'v'}{'pi'}
959 0 20 unless $$t{'v'}{'pi'} == 1
963 0 8 unless $d == 1 or $d == 2 or $d == 3 or $d == 6
964 6 14 if $d == 1
965 6 14 if $d == 2
966 8 12 if $d == 3
969 2 18 if $c == 10
970 0 18 if $c == 11
971 0 18 if $c == 12
972 3 15 if $c == 0
973 0 15 if $c == 1
974 2 13 if $c == 2
975 3 10 if $c == 3
976 2 8 if $c == 4
977 0 8 if $c == 5
978 3 5 if $c == 6
979 0 5 if $c == 7
980 2 3 if $c == 8
981 3 0 if $c == 9
995 0 1 unless $$a{'z'}
997 0 1 if $a == $one
1011 0 0 unless $$t{'id'}
1025 0 0 unless $$t{'z'}
1044 0 25949 if exists $$t{'z'}
1047 12108 13841 if defined $z{$p}
1084 52072 25949 if defined $$t{'s'}
1089 16177 9772 if $$t{'d'} != 1
1090 10858 15091 if $$t{'i'} == 1
1095 6011 19938 if $$t{'divide'}
1096 207 25742 if $$t{'sqrt'}
1097 11863 14086 if $$t{'exp'}
1098 1 25948 if $$t{'log'}
1150 0 45 if exists $p{'term'}
1165 0 45 if keys %p
1210 0 0 unless ref $b eq 'Math::Algebra::Symbols::Term'
1211 0 0 unless $$a{'z'} and $$b{'z'}
1226 0 0 unless ref $b eq 'Math::Algebra::Symbols::Term'
0 0 if (defined $b) { }
1227 0 0 unless $$a{'z'}
1228 0 0 unless $$a{'z'} and $$b{'z'}
1229 0 0 if $c
1230 0 0 unless $c
1248 0 0 unless ref $b eq 'Math::Algebra::Symbols::Term'
1249 0 0 unless $$a{'z'} and $$b{'z'}
1263 0 0 unless ref $b eq 'Math::Algebra::Symbols::Term'
1264 0 0 unless $$a{'z'} and $$b{'z'}
1265 0 0 if $c
1266 0 0 unless $c
1279 0 0 unless ref $b eq 'Math::Algebra::Symbols::Term'
1280 0 0 unless $$a{'z'} and $$b{'z'}
1294 0 10313 unless $$a{'z'} and $$b{'z'}
10313 0 if (ref $b eq 'Math::Algebra::Symbols::Term') { }
1295 0 0 unless $$a{'z'}
1314 0 28306 unless $$a{'z'}
1328 0 0 unless $$a{'z'}
1342 0 0 unless $$a{'z'}
1356 0 0 unless $$a{'z'}
1370 0 0 unless $$a{'z'}
1384 0 0 unless $$a{'z'}
1399 0 0 unless $a == $zero
1400 0 0 unless $a == $one
1401 0 0 unless $a == $two
1402 0 0 unless $b == 3
1403 0 0 unless $c == 4
1404 0 0 unless $c == 5
1405 0 0 unless $c == 10
1406 0 0 unless $c == 3
1407 0 0 unless $c == 4
1408 0 0 unless $c == 2
1409 0 0 unless $c == 1
1410 0 0 unless $c == -6
1411 0 0 unless $c == $one
1412 0 0 unless $c == '1/2'
1413 0 0 unless $c == $two
1414 0 0 unless $c == $one
1415 0 0 unless $c == 4
1416 0 0 unless $c == 1024
1417 0 0 unless $c == $a
1418 0 0 unless $d == -1
1419 0 0 unless $c == '1*i'
1420 0 0 unless $d == 4
1421 0 0 unless $c == 2
1422 0 0 unless $c == '1*$x/$a*$y**2/$b**2'
1424 0 0 unless $a == '1*$x'
1425 0 0 unless $b == '2*$x**2'
1426 0 0 unless $c == '2*$x'
1427 0 0 unless $c == '3*$x'
1428 0 0 unless $c == $zero
1429 0 0 unless $c == '-1*$x'
1430 0 0 unless $c == '2*$x**3'
1431 0 0 unless $c == '4*$x**6'
1432 0 0 unless $c == '2*$x'
1435 0 0 unless $c == '1/2'
1436 0 0 unless $c == $a
1438 0 0 unless $a == 0
1439 0 0 unless $a == $half
1440 0 0 unless $a == 1
1441 0 0 unless $a == $half
1442 0 0 unless $a == $zero
1443 0 0 unless $a == -$half
1444 0 0 unless $a == -1
1445 0 0 unless $a == '-1/2'
1446 0 0 unless $a == $zero
1447 0 0 unless $a == $zero
1448 0 0 unless $a == -$half
1449 0 0 unless $a == -$one
1450 0 0 unless $a == -$half
1451 0 0 unless $a == -$zero
1452 0 0 unless $a == $half
1453 0 0 unless $a == $one
1454 0 0 unless $a == $half
1455 0 0 unless $a == $zero
1456 0 0 unless $a == $one
1457 0 0 unless $a == $half
1458 0 0 unless $a == $zero
1459 0 0 unless $a == -$half
1460 0 0 unless $a == -$one
1461 0 0 unless $a == -$half
1462 0 0 unless $a == $zero
1463 0 0 unless $a == $half
1464 0 0 unless $a == $one
1465 0 0 unless $a == $one
1466 0 0 unless $a == $half
1467 0 0 unless $a == $zero
1468 0 0 unless $a == -$half
1469 0 0 unless $a == -$one
1470 0 0 unless $a == -$half
1471 0 0 unless $a == $zero
1472 0 0 unless $a == $half
1473 0 0 unless $a == $one
1474 0 0 unless $a == $one
1475 0 0 unless $a == $i
1476 0 0 unless $a == -$one
1477 0 0 unless $a == -$i
1478 0 0 unless $a == $one