Branch Coverage

blib/lib/Math/Algebra/Symbols/Term.pm
Criterion Covered Total %
branch 247 550 44.9


line true false branch
47 45 1106 unless $a
58 1106 0 if ($A =~ m[^\s*([+-])?(\d+)?(?:/(\d+))?(i)?(?:\*)?(.*)$])
60 161 945 if $1 and $1 eq '-'
61 848 258 if $2
62 213 893 if $c eq ''
63 45 1061 if $c eq '-'
65 115 991 if $3
66 991 115 if $d eq ''
68 117 989 if $4
75 1 141 if defined $2
76 141 1 unless defined $2
79 0 1106 if $A eq $b
80 0 1106 if $b
107 798 1151 unless scalar @_
123 200981 2003 if $x == 1 or $y == 1
125 1623 380 if $y < $a
129 2003 2257 if $r == 0
145 0 0 if $x == 1 or $y == 1
169 0 581366 if $i == 1
170 0 581366 unless $i =~ /^[\+\-]?\d+/
171 397 580969 if $i > 10000000
185 102452 203879 unless @_ > 1
187 4978 198901 $_[1] == 1 ? :
201 89 203443 unless @_ > 1
203 203236 207 $_[1] == 1 ? :
217 6095 0 $_[1] ? :
220 421 5674 if ($t->{'d'} > 1)
222 274 147 if ($g > 1)
240 197097 5224 $_[1] == 1 ? :
241 0 202321 unless $d != 0
245 1165 201156 if ($g > 1)
250 31 202290 if $d < 0
278 0 0 unless exists $t->{'z'}
302 0 0 unless exists $t->{'z'}
326 0 0 unless exists $t->{'z'}
351 832 107551 unless @_ > 1
353 2086 105465 $_[1] == 1 ? :
357 0 107551 if $i4 == 2 or $i4 == 3
386 14465 1989 unless @_ > 1
416 717 3111 unless @_ > 1
446 0 3560 unless @_ > 1
461 0 1 unless @_ > 1
484 802 388 exists $t->{'v'}{$v} ? :
1190 272823 if @_ == 2
486 1254 271569 $_[2] == 1 ? :
487 269455 3368 if $p
488 3368 269455 unless $p
517 0 222027 unless $t->{'z'}
553 6459 313833 if defined $t->{'divide'}
554 950 319342 if defined $t->{'sqrt'}
555 13416 306876 if defined $t->{'exp'}
556 2 320290 if defined $t->{'log'}
557 12530 307762 if $t->{'i'} == 1
558 4037 316255 if $s eq ''
572 0 0 exists $t->{'z'} ? :
587 0 102282 unless $a->{'z'} and $b->{'z'}
589 0 102282 unless $a->{'z'} eq $b->{'z'}
590 2534 99748 if $a == $b
596 3858 95890 if $c == 0
613 0 0 unless $a->{'z'} and $b->{'z'}
615 0 0 if $a == $b
616 0 0 if $b == $zero
617 0 0 if $a == $zero
618 0 0 unless $a->{'z'} eq $b->{'z'}
640 0 109239 unless $a->{'z'} and $b->{'z'}
647 2819 106048 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'}
653 162 105886 if $i == 2
662 256740 15726 exists $z->{'v'}{$v} ? :
666 104221 1827 unless defined $a->{'divide'}
667 105953 95 unless defined $a->{'sqrt'}
668 103023 3025 unless defined $a->{'exp'}
669 106048 0 unless defined $a->{'log'}
687 0 271 unless $a->{'z'} and $b->{'z'}
691 4 0 if defined $b->{'divide'} and !defined($a->{'divide'}) || $a->{'divide'}->id != $b->{'divide'}->id
693 25 2 if defined $b->{'sqrt'} and !defined($a->{'sqrt'}) || $a->{'sqrt'}->id != $b->{'sqrt'}->id
695 0 0 if defined $b->{'exp'} and !defined($a->{'exp'}) || $a->{'exp'}->id != $b->{'exp'}->id
697 0 0 if defined $b->{'log'} and !defined($a->{'log'}) || $a->{'log'}->id != $b->{'log'}->id
703 0 242 if $i == -1
715 0 242 if defined $a->{'divide'} and defined $b->{'divide'}
716 2 240 if defined $a->{'sqrt'} and defined $b->{'sqrt'}
717 0 242 if defined $a->{'exp'} and defined $b->{'exp'}
718 0 242 if defined $a->{'log'} and defined $b->{'log'}
736 0 0 unless $t->{'z'}
743 0 0 if $t->{'divide'} or $t->{'sqrt'} or $t->{'exp'} or $t->{'log'}
747 0 0 if $i
770 0 0 unless $a->{'z'} and $b->{'z'}
773 0 0 if $a == $one or $b == $zero
778 0 0 if $a->{'divide'} or $a->{'sqrt'} or $a->{'exp'} or $a->{'log'}
786 0 0 if $b->{'d'} != 1 or $b->{'i'} == 1 or $b->{'divide'} or $b->{'sqrt'} or $b->{'exp'} or $b->{'log'}
792 0 0 if ($p < 0)
794 0 0 unless $a
796 0 0 if $p == 1
826 0 97 if $a >= 65536 or $a < 0
828 27 70 if $s * $s != $a
835 0 62 unless $t->{'z'}
842 0 62 if $t->{'i'} or $t->{'divide'} or $t->{'sqrt'} or $t->{'exp'} or $t->{'log'}
846 4 58 if $c < 0
850 27 35 unless defined $c2
851 0 35 unless defined $d2
858 9 5 unless $p % 2 == 0
877 0 1405 unless $t->{'z'}
879 103 1302 if $t == $zero
883 0 1302 if $t->{'divide'} or $t->{'sqrt'} or $t->{'exp'} or $t->{'log'}
884 350 952 unless $t->{'i'} == 1
887 0 51 unless $t->{'d'} == 1 or $t->{'d'} == 2 or $t->{'d'} == 4
890 918 26 unless scalar keys %{$$t{'v'};} == 1 and exists $t->{'v'}{'pi'} and $t->{'v'}{'pi'} == 1
894 7 19 if $d == 1
897 1 25 if $c == 0
898 9 16 if $c == 1
899 6 10 if $c == 2
900 10 0 if $c == 3
914 0 120 unless $t->{'z'}
916 3 117 if $t == $zero
920 0 117 if $t->{'divide'} or $t->{'sqrt'} or $t->{'exp'} or $t->{'log'}
921 4 113 unless $t->{'i'} == 0
922 2 111 unless scalar keys %{$$t{'v'};} == 1
923 91 20 unless exists $t->{'v'}{'pi'}
924 0 20 unless $t->{'v'}{'pi'} == 1
928 0 8 unless $d == 1 or $d == 2 or $d == 3 or $d == 6
929 6 14 if $d == 1
930 6 14 if $d == 2
931 0 20 if $d == 3
934 3 17 if $c == 0
935 2 15 if $c == 1
936 0 15 if $c == 2
937 3 12 if $c == 3
938 0 12 if $c == 4
939 2 10 if $c == 5
940 3 7 if $c == 6
941 2 5 if $c == 7
942 0 5 if $c == 8
943 3 2 if $c == 9
944 0 2 if $c == 10
945 2 0 if $c == 11
946 0 0 if $c == 12
960 0 125 unless $t->{'z'}
962 3 122 if $t == $zero
966 0 122 if $t->{'divide'} or $t->{'sqrt'} or $t->{'exp'} or $t->{'log'}
967 4 118 unless $t->{'i'} == 0
968 2 116 unless scalar keys %{$$t{'v'};} == 1
969 96 20 unless exists $t->{'v'}{'pi'}
970 0 20 unless $t->{'v'}{'pi'} == 1
974 0 8 unless $d == 1 or $d == 2 or $d == 3 or $d == 6
975 6 14 if $d == 1
976 6 14 if $d == 2
977 8 12 if $d == 3
980 2 18 if $c == 10
981 0 18 if $c == 11
982 0 18 if $c == 12
983 3 15 if $c == 0
984 0 15 if $c == 1
985 2 13 if $c == 2
986 3 10 if $c == 3
987 2 8 if $c == 4
988 0 8 if $c == 5
989 3 5 if $c == 6
990 0 5 if $c == 7
991 2 3 if $c == 8
992 3 0 if $c == 9
1006 0 1 unless $a->{'z'}
1008 0 1 if $a == $one
1022 0 0 unless $t->{'id'}
1036 0 0 unless $t->{'z'}
1055 0 218725 if exists $t->{'z'}
1058 38943 179782 if defined $z{$p}
1095 496948 218725 if defined $t->{'s'}
1100 12797 205928 if $t->{'d'} != 1
1101 7270 211455 if $t->{'i'} == 1
1106 4560 214165 if defined $t->{'divide'}
1107 441 218284 if defined $t->{'sqrt'}
1108 9311 209414 if defined $t->{'exp'}
1109 1 218724 if defined $t->{'log'}
1161 0 45 if exists $p{'term'}
1176 0 45 if keys %p
1221 0 0 unless ref $b eq 'Math::Algebra::Symbols::Term'
1222 0 0 unless $a->{'z'} and $b->{'z'}
1237 0 0 if (defined $b) { }
1238 0 0 unless ref $b eq 'Math::Algebra::Symbols::Term'
1239 0 0 unless $a->{'z'} and $b->{'z'}
1240 0 0 if $c
1241 0 0 unless $c
1244 0 0 unless $a->{'z'}
1259 0 0 unless ref $b eq 'Math::Algebra::Symbols::Term'
1260 0 0 unless $a->{'z'} and $b->{'z'}
1274 0 0 unless ref $b eq 'Math::Algebra::Symbols::Term'
1275 0 0 unless $a->{'z'} and $b->{'z'}
1276 0 0 if $c
1277 0 0 unless $c
1290 0 0 unless ref $b eq 'Math::Algebra::Symbols::Term'
1291 0 0 unless $a->{'z'} and $b->{'z'}
1305 103933 0 if (ref $b eq 'Math::Algebra::Symbols::Term') { }
1306 0 103933 unless $a->{'z'} and $b->{'z'}
1310 0 0 unless $a->{'z'}
1325 0 437072 unless $a->{'z'}
1339 0 0 unless $a->{'z'}
1353 0 0 unless $a->{'z'}
1367 0 0 unless $a->{'z'}
1381 0 0 unless $a->{'z'}
1395 0 0 unless $a->{'z'}
1410 0 0 unless $a == $zero
1411 0 0 unless $a == $one
1412 0 0 unless $a == $two
1413 0 0 unless $b == 3
1414 0 0 unless $c == 4
1415 0 0 unless $c == 5
1416 0 0 unless $c == 10
1417 0 0 unless $c == 3
1418 0 0 unless $c == 4
1419 0 0 unless $c == 2
1420 0 0 unless $c == 1
1421 0 0 unless $c == -6
1422 0 0 unless $c == $one
1423 0 0 unless $c == '1/2'
1424 0 0 unless $c == $two
1425 0 0 unless $c == $one
1426 0 0 unless $c == 4
1427 0 0 unless $c == 1024
1428 0 0 unless $c == $a
1429 0 0 unless $d == -1
1430 0 0 unless $c == '1*i'
1431 0 0 unless $d == 4
1432 0 0 unless $c == 2
1433 0 0 unless $c == '1*$x/$a*$y**2/$b**2'
1435 0 0 unless $a == '1*$x'
1436 0 0 unless $b == '2*$x**2'
1437 0 0 unless $c == '2*$x'
1438 0 0 unless $c == '3*$x'
1439 0 0 unless $c == $zero
1440 0 0 unless $c == '-1*$x'
1441 0 0 unless $c == '2*$x**3'
1442 0 0 unless $c == '4*$x**6'
1443 0 0 unless $c == '2*$x'
1446 0 0 unless $c == '1/2'
1447 0 0 unless $c == $a
1449 0 0 unless $a == 0
1450 0 0 unless $a == $half
1451 0 0 unless $a == 1
1452 0 0 unless $a == $half
1453 0 0 unless $a == $zero
1454 0 0 unless $a == -$half
1455 0 0 unless $a == -1
1456 0 0 unless $a == '-1/2'
1457 0 0 unless $a == $zero
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 == $half
1466 0 0 unless $a == $zero
1467 0 0 unless $a == $one
1468 0 0 unless $a == $half
1469 0 0 unless $a == $zero
1470 0 0 unless $a == -$half
1471 0 0 unless $a == -$one
1472 0 0 unless $a == -$half
1473 0 0 unless $a == $zero
1474 0 0 unless $a == $half
1475 0 0 unless $a == $one
1476 0 0 unless $a == $one
1477 0 0 unless $a == $half
1478 0 0 unless $a == $zero
1479 0 0 unless $a == -$half
1480 0 0 unless $a == -$one
1481 0 0 unless $a == -$half
1482 0 0 unless $a == $zero
1483 0 0 unless $a == $half
1484 0 0 unless $a == $one
1485 0 0 unless $a == $one
1486 0 0 unless $a == $i
1487 0 0 unless $a == -$one
1488 0 0 unless $a == -$i
1489 0 0 unless $a == $one