[GiNaC-devel] Bug fixes for polylogs

Richard B. Kreckel kreckel at ginac.de
Sun Jan 19 10:32:56 CET 2014


Hi,

On 01/17/2014 09:22 AM, Stefan Weinzierl wrote:
> the method Li_eval checks if all entries of x_ are equal to +1 or -1.
> In this case, the function Li is converted to a multiple zeta value.
> If all but the first entry of x_ are equal to +1 or -1, the function
> Li is converted to a harmonic polylog H.
> After checking that an entry of x_ is equal to +1 or -1, the operator >
> is used. This may lead to an "numeric::operator>(): complex inequality"
> exception in the case where the real part of an entry of x_ is equal to
> +/-1 (either exact or as a float, this does not matter) and the
> imaginary part is equal to zero as a float.
> The attached patch avoids the improper use of the operator > in this
> cases and sets the +/-1 arguments of H and zeta as real numbers.
> For zeta the method Li_eval is modified, for H the appropriate place is
> a modification of the method convert_parameter_Li_to_H.

I see: If one of the x_ is ±1+0.0*I, then it should be assumed to be ±1.
As discussed, this would go against the principles of CLN. But those
principles are not GiNaC's which simplifies 2.0*x-x-x to 0, not to 0.0*x.

This just makes me wonder if the elimination of a floating-point zero
imaginary part would make a useful transformation of class numeric.

  -richy.
-- 
Richard B. Kreckel
<http://www.ginac.de/~kreckel/>


More information about the GiNaC-devel mailing list