[GiNaC-devel] [SCM] GiNaC -- a C++ library for symbolic computations branch, master, updated. release_1-4-0-659-gfa1ffcfd

Alexey Sheplyakov asheplyakov at yandex.ru
Thu Jun 18 21:40:35 CEST 2020


Hello!

18.06.2020, 01:40, "Richard B. Kreckel" <kreckel at in.terlu.de>:

> Without the patch, it evals |a|' → (a'*a)/|a| for real a.
> If, then, one substitutes a→0, then it throws division by zero.
> With the patch, it evals to a'*0. Okay, you do have a point.
>
> On the other hand, a later substitution of a variable by a special value
> is not always consistently handled; just consider x/x → 1 or variants
> thereof. How does that compare to our situation here?

Replacing x/x with 1 is OK in the sense of the limit when x -> 0.
Being more strict would be nice. However that requires additional
constraints on variables, and it's difficult to discover them in advance. 

The patch in question extends sloppiness even more.
It replaces x/abs(x) with 1/2 when x -> 0 despite x/abs(x) having no limit at x -> 0.

Best regards,
      Alexey



More information about the GiNaC-devel mailing list