Hi Waldek,
On 05/31/2014 04:40 AM, [email protected] wrote:
> commit 25ebb18781cfe2c21f053a8a30086b66cd3724f3
> Author: Waldek Hebisch <[email protected]>
> Date: Sat May 31 02:39:24 2014 +0000
>
> Fix gcd failure due to bad reduction.
>
>
> git-svn-id: https://fricas.svn.sourceforge.net/svnroot/fricas/trunk@1780
> b0c55286-4f34-0410-a049-a1e7e93b0762
>
> ChangeLog | 4 ++++
> src/algebra/pgcd.spad | 35 ++++++++++++++++++++---------------
> src/input/Makefile.in | 2 +-
> src/input/pgcd.input | 22 ++++++++++++++++++++++
> 4 files changed, 47 insertions(+), 16 deletions(-)
Can you give put more information into the log message so that other
people can check what the actual problem before the patch was and why
and how the patch fixes that problem? Otherwise it's hard to check that
your code doesn't introduce a bug for some other cases.
> @@ -0,0 +1,22 @@
> +)set break resume
> +)expose UnittestCount UnittestAux Unittest
> +
> +testsuite "polynomial gcd"
> +
> +testcase "bad reduction"
> +
> +p1 := x^6*(50*y^8 -68*y^6 -104*y^4 + 36*y^2 + 22) + _
> + x^4*(12*y^8 -10*y^6 -64*y^4 -6*y^2 + 4) + _
> + x^2*(2*y^6 -14*y^4 -8*y^2) + (-y^4 - y^2)
> +p2 := x^8*(16*y^10 + 16*y^8 -96*y^6 -224*y^4 -176*y^2 -48) + _
> + x^6*(-72*y^10 + 188*y^8 -188*y^6 -572*y^4 -108*y^2 + 16) + _
> + x^4*(-64*y^10 + 188*y^8 + 372*y^6 + 60*y^4 -124*y^2) + _
> + x^2*(68*y^8 + 172*y^6 + 97*y^4 -15*y^2) + _
> + (8*y^8 + 22*y^6 + 14*y^4)
> +p1u := univariate(p1, x)
> +p2u := univariate(p2, x)
> +testTrue("(lg := [gcd(p1u, p2u) for i in 1..1000]; true)")
I don't get the meaning of the last line. You compute the *same* gcd
1000 times. Why? Any this test case always returns true, so why would
that be a testcase at all?
Furthermore, what does this have to do with what bug or with your fix?
To be honest, I like that you commit fixes, but if nobody can follow
what you are doing or has to invest a lot of time in finding out what
you could easily have explained, you are heading for a one-man-project.
I couldn't check your code, because I simply don't know what the problem
was.
Ralf
--
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.