[GiNaC-devel] [PATCH] {add, power}::eval(): convert terms into primitive polynomials when possible.

Jens Vollinga vollinga at physik.uni-wuppertal.de
Wed Jul 11 15:09:52 CEST 2007


Hi,

Alexei Sheplyakov schrieb:
> The following transformations are done automagically now:
> (-x+y)*(x-y) -> -(x-y)^2
> (3*x+y)/(6*x+2*y)^2 -> 1/4*(y+3*x)^(-1)
> 
> Please note: exam_series13() from check/exam_pseries.cpp fails due to
> this patch, because the expression 1/x*(-(1+x)/(1-x)) + (1+x)/x/(1-x)
> gets evaluated to zero.

thanks for the patch! I modified exam_series13() so that it doesn't use 
the new transformation.

Regards,
Jens


More information about the GiNaC-devel mailing list