axiom-developer
[Top][All Lists]

## [Axiom-developer] Re: severe (!) bug in normalize

 From: Waldek Hebisch Subject: [Axiom-developer] Re: severe (!) bug in normalize Date: Tue, 5 Dec 2006 23:59:44 +0100 (CET)

> Dear all,
>
> I just discovered a severe bug in normalize\$EFSTRUC. It is probably the worst
> thing I found so far.
>
> with
>
>  T :=t^(n^2)*(sqrt(1+t))^n
>
>  normalize(T/eval(T, n=n-1))
>
> gives sqrt(t+1). sum\$SUMFS uses this method to check whether a function is
> rational for Gosper, and thus returns completely false results, which are,
> however, difficult to detect.
>
> Waldek, am I right that you know normalize a little bit? If you do, PLEASE
> look
> into this, it is a real show stopper for me.
>

Have you tried the patch I posted?  With this patch applied I get:

(4) -> T :=t^(n^2)*(sqrt(1+t))^n
(4) ->
2
n   +-----+n
(4)  t   \|t + 1
Type: Expression Integer
(5) -> T1 := eval(T, n=n-1)
(5) ->
2
n  - 2n + 1  +-----+n - 1
(5)  t            \|t + 1
Type: Expression Integer
(6) -> normalize(T/T1)
(6) ->
2
+-----+  n log(t)
\|t + 1 %e
(6)  ---------------------
2
(n  - 2n + 1)log(t)
%e
Type: Expression Integer

This result is probably not what you want, but it is equal to your
expression and the kernels are algebraically independent.

P.S. AFAICS the problem is that the full list of kernel contains both
transcendental and algebraic kernels. goodCoef is relevant only for
transcendental kernels and got cofficients as a vector corresponding
to transcendental kernels. However, the list passed to goodCoef still
contain algebraic kernels, so goodCoef gets confised, and tries
to eliminate wrong kernel.

--
Waldek Hebisch