line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Copyright (c) 2009-2019 Martin Becker, Blaubeuren. |
2
|
|
|
|
|
|
|
# This package is free software; you can distribute it and/or modify it |
3
|
|
|
|
|
|
|
# under the terms of the Artistic License 2.0 (see LICENSE file). |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Math::ModInt::Trivial; |
6
|
|
|
|
|
|
|
|
7
|
4
|
|
|
4
|
|
566
|
use 5.006; |
|
4
|
|
|
|
|
14
|
|
8
|
4
|
|
|
4
|
|
20
|
use strict; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
85
|
|
9
|
4
|
|
|
4
|
|
17
|
use warnings; |
|
4
|
|
|
|
|
41
|
|
|
4
|
|
|
|
|
123
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
# ----- object definition ----- |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
# Math::ModInt::Trivial=ARRAY(...) |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# .......... index .......... # .......... value .......... |
16
|
4
|
|
|
4
|
|
21
|
use constant NFIELDS => 0; |
|
4
|
|
|
|
|
16
|
|
|
4
|
|
|
|
|
432
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
# ----- class data ----- |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
BEGIN { |
21
|
4
|
|
|
4
|
|
24
|
require Math::ModInt; |
22
|
4
|
|
|
|
|
61
|
our @ISA = qw(Math::ModInt); |
23
|
4
|
|
|
|
|
846
|
our $VERSION = '0.012'; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
*signed_residue = |
27
|
|
|
|
|
|
|
*centered_residue = \&residue; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
my $singleton = bless []; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
# ----- overridden methods ----- |
32
|
|
|
|
|
|
|
|
33
|
1
|
|
|
1
|
|
3
|
sub _NEG { $singleton } |
34
|
3
|
|
|
3
|
|
6
|
sub _ADD { $singleton } |
35
|
3
|
|
|
3
|
|
6
|
sub _SUB { $singleton } |
36
|
3
|
|
|
3
|
|
7
|
sub _MUL { $singleton } |
37
|
3
|
|
|
3
|
|
6
|
sub _DIV { $singleton } |
38
|
8
|
|
|
8
|
|
18
|
sub _POW { $singleton } |
39
|
1
|
|
|
1
|
|
2
|
sub _INV { $singleton } |
40
|
14
|
|
|
14
|
|
26
|
sub _NEW { $singleton } |
41
|
1
|
|
|
1
|
|
3
|
sub _NEW2 { $_[1], $singleton } |
42
|
|
|
|
|
|
|
|
43
|
66
|
|
|
66
|
1
|
206
|
sub modulus { 1 } |
44
|
46
|
|
|
46
|
1
|
315
|
sub residue { 0 } |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
1; |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
__END__ |