Dear Fricas developers,

I am playing around benchmarking CAS for the computation of polynomial GCDs
with tests similar as those given in this paper:
https://arxiv.org/pdf/2304.13418.pdf.

More specifically I am using the following test using `Symbolica
<https://symbolica.io/>` Python API:

```python
a = Expression.parse('(1 + 3*x1 + 5*x2 + 7*x3 + 9*x4 + 11*x5 + 13*x6 +
15*x7)^7 - 1').to_rational_polynomial()
b = Expression.parse('(1 - 3*x1 - 5*x2 - 7*x3 + 9*x4 - 11*x5 - 13*x6 +
15*x7)^7 + 1').to_rational_polynomial()
g = Expression.parse('(1 + 3*x1 + 5*x2 + 7*x3 + 9*x4 + 11*x5 + 13*x6 -
15*x7)^7 + 3').to_rational_polynomial()
ag = a * g
bg = b * g
print(g.gcd(bg) - g)
```

Which runs in about 7 seconds on my laptop and prints out the expected 0.

Then with `FriCAS`, I am doing:
```

a := (1 + 3*x1 + 5*x2 + 7*x3 + 9*x4 + 11*x5 + 13*x6 + 15*x7)^7 - 1;

b := (1 - 3*x1 - 5*x2 - 7*x3 + 9*x4 - 11*x5 - 13*x6 + 15*x7)^7 + 1;

g := (1 + 3*x1 + 5*x2 + 7*x3 + 9*x4 + 11*x5 + 13*x6 - 15*x7)^7 + 3;

ag := a * g;

bg := b * g;

gcd(ag, bg) -g
```

which runs in about 25 seconds on my laptop but **does not evaluate to zero*
*!

My question is thus two-fold:

a) Is this non-zero result expected? What is the proper way to get the
correct GCD?

b) Is my usage of `gcd` above the fastest way to compute polynomial GCDs
and therefore a fair comparison with other CAS?

Thank you for your help,

-- 
Valentin

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/CABqv2LHqLGS0zXfM_COXe-q_7aWX3WkeANBMYHgfx-3mBq%3Dnuw%40mail.gmail.com.

Reply via email to