Ralf Hemmecke wrote:
> 
> 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.
> >     
> 
> 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.

1) Have you run the test on unpatched FriCAS?

2) Google for 'polynomial gcd failure due to bad reduction'.  That
   finds literature explaining how similar computations works.  Atfer
   that it should be clear why the test is of such form.  Another paper
   is referenced at top of PGCD.

3) If you know how algorithm is supposed to work, then with reasonable
   effort you can go trough code line by line and see what happens.
   If you pretend to know nothing about p-adic GCD algorithm, then
   the only way for me to explain is to write paper with explanation
   of the algorithm.  I may do this some day, but it is not easy
   task.  And there are already written paper giving adequate
   background.

4) The patch is bigger than strictly necessary.  But the original
   coding was so bad that felt that I need to fix that too.  The
   first PGCD hunk just fixes coding.  The second one is what
   matters.

5) Concerning re-checking the patch: if I made an error than
   an explanantion could easily bias you to repeat the same
   error.

6) Concerning attracting more people to the code: I am not
   convinced that a lot of explanations would help.  More
   precisely, pointing out to paper and code implementing
   things decribed in paper can help in getting attention
   of people interesed in algorithms.  But understanding
   of PGCD requires some serious effort.  And once
   somebody is willing to spend this effort he/she may
   get quite far just reading papers and code.  If somebody
   is stuck at specific problem I would happily discuss
   details.  But generic reqest of sort "add more explanation"
   are of little use.

7) Sorry if the above sound too harsh.  But it looked
   like you turned off thinking: PGCD is _randomized_
   (Las Vegas) algorithm and we need several tries to
   hit the bug (1000 is a compromise between time to run
   the test and probability of hitting the bug).

-- 
                              Waldek Hebisch
[email protected] 

-- 
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.

Reply via email to