Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ALMASTY
mq
Commits
2420015b
Commit
2420015b
authored
Jun 24, 2022
by
Charles Bouillaguet
Browse files
do not count empty polynomials
parent
7994bbe1
Changes
3
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
2420015b
...
...
@@ -2,6 +2,12 @@
This code is in the public domain. Several algorithms are implemented.
These programs are distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
They are not garanteed to always produce CORRECT RESULTS.
Exhaustive search is available elsewhere, in the
[
libfes-lite
](
https://gitlab.lip6.fr/almasty/libfes-lite
)
library.
...
...
@@ -22,7 +28,6 @@ Example:
./monica_vector --inner-hybridation 7 < examples/random_40_quad.in
```
WARNING: this program has a bug ; it may incorrectly report that there are no solutions.
# Moebius
...
...
monica.c
View file @
2420015b
...
...
@@ -98,6 +98,18 @@ void store_monomial(void *opaque, int line, int column, int degree, const int *v
void
store_polynomial
(
void
*
opaque
,
int
line
)
{
// detect empty polynomials
bool
nz
=
0
;
struct
poly_t
*
p
=
&
poly
[
m
];
nz
|=
p
->
c
;
for
(
int
i
=
0
;
i
<
64
;
i
++
)
nz
|=
p
->
l
[
i
];
for
(
int
i
=
0
;
i
<
63
;
i
++
)
for
(
int
j
=
0
;
j
<
64
;
j
++
)
nz
|=
p
->
q
[
i
][
j
];
if
(
!
nz
)
return
;
m
+=
1
;
if
(
m
==
capacity
)
{
capacity
=
1
+
2
*
capacity
;
...
...
@@ -453,9 +465,7 @@ bool candidate_solution(const struct poly_t *p, int m, int n, u64 x) {
int
main
(
int
argc
,
char
**
argv
)
{
printf
(
"WARNING: this program has a bug ; it may incorrectly report that there are no solutions.
\n
"
);
{
/* parse command-line options */
int
v
=
-
1
;
int
max_excess
=
4
;
...
...
monica_vector.c
View file @
2420015b
...
...
@@ -170,6 +170,18 @@ void store_monomial(void *opaque, int line, int column, int degree, const int *v
void
store_polynomial
(
void
*
opaque
,
int
line
)
{
// detect empty polynomials
bool
nz
=
0
;
struct
poly_t
*
p
=
&
poly
[
m
];
nz
|=
p
->
c
;
for
(
int
i
=
0
;
i
<
64
;
i
++
)
nz
|=
p
->
l
[
i
];
for
(
int
i
=
0
;
i
<
63
;
i
++
)
for
(
int
j
=
0
;
j
<
64
;
j
++
)
nz
|=
p
->
q
[
i
][
j
];
if
(
!
nz
)
return
;
m
+=
1
;
if
(
m
==
capacity
)
{
capacity
=
1
+
2
*
capacity
;
...
...
@@ -593,9 +605,7 @@ static void process_candidates(int v, u64 y, vector consistent, vector defect, c
int
main
(
int
argc
,
char
**
argv
)
{
printf
(
"WARNING: this program has a bug ; it may incorrectly report that there are no solutions.
\n
"
);
{
/* parse command-line options */
struct
option
longopts
[
3
]
=
{
{
"inner-hybridation"
,
required_argument
,
NULL
,
'v'
},
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment