line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Copyright (c) 2009-2015 Martin Becker. All rights reserved. |
2
|
|
|
|
|
|
|
# This package is free software; you can redistribute it and/or modify it |
3
|
|
|
|
|
|
|
# under the same terms as Perl itself. |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# $Id: Trivial.pm 60 2015-05-18 08:47:12Z demetri $ |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
package Math::ModInt::Trivial; |
8
|
|
|
|
|
|
|
|
9
|
4
|
|
|
4
|
|
1214
|
use 5.006; |
|
4
|
|
|
|
|
14
|
|
|
4
|
|
|
|
|
187
|
|
10
|
4
|
|
|
4
|
|
24
|
use strict; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
179
|
|
11
|
4
|
|
|
4
|
|
24
|
use warnings; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
177
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
# ----- object definition ----- |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# Math::ModInt::Trivial=ARRAY(...) |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# .......... index .......... # .......... value .......... |
18
|
4
|
|
|
4
|
|
26
|
use constant NFIELDS => 0; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
456
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# ----- class data ----- |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
BEGIN { |
23
|
4
|
|
|
4
|
|
26
|
require Math::ModInt; |
24
|
4
|
|
|
|
|
62
|
our @ISA = qw(Math::ModInt); |
25
|
4
|
|
|
|
|
821
|
our $VERSION = '0.011'; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
my $singleton = bless []; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
# ----- overridden methods ----- |
31
|
|
|
|
|
|
|
|
32
|
1
|
|
|
1
|
|
2
|
sub _NEG { $singleton } |
33
|
3
|
|
|
3
|
|
6
|
sub _ADD { $singleton } |
34
|
3
|
|
|
3
|
|
5
|
sub _SUB { $singleton } |
35
|
3
|
|
|
3
|
|
6
|
sub _MUL { $singleton } |
36
|
3
|
|
|
3
|
|
6
|
sub _DIV { $singleton } |
37
|
8
|
|
|
8
|
|
26
|
sub _POW { $singleton } |
38
|
1
|
|
|
1
|
|
2
|
sub _INV { $singleton } |
39
|
14
|
|
|
14
|
|
32
|
sub _NEW { $singleton } |
40
|
1
|
|
|
1
|
|
3
|
sub _NEW2 { $_[1], $singleton } |
41
|
|
|
|
|
|
|
|
42
|
67
|
|
|
67
|
1
|
188
|
sub modulus { 1 } |
43
|
45
|
|
|
45
|
1
|
285
|
sub residue { 0 } |
44
|
1
|
|
|
1
|
1
|
3
|
sub signed_residue { 0 } |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
1; |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
__END__ |