Hi! On 17.06.20 20:13, Alexey Sheplyakov wrote:
17.06.2020, 21:54, "Richard B. Kreckel via GiNaC-devel" <ginac-devel@ginac.de>:
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GiNaC -- a C++ library for symbolic computations".
The branch, master has been updated via fa1ffcfdc9da97a6fb7cc2c9c36fe1fc45c808a9 (commit) from 63453e8120d2e2eb9f1b836fc1b5651c2494ef1f (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit fa1ffcfdc9da97a6fb7cc2c9c36fe1fc45c808a9 Author: Pierangelo Masarati <pierangelo.masarati@polimi.it> Date: Wed Jun 17 19:52:49 2020 +0200
Improve diff(abs(x)) for real x.
I think this patch is wrong and should be reverted. diff(abs(x)) does not exist at x -> 0.
Hmm, I had read your remark [1] as consent. 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?
Alternatively one can modify the definition of numeric::step() function [1] so it throws an exception when being evaluated at 0.
Well, remember that step(0)→½ is of course inspired from Fourier analysis and is tremendously useful in physics when doing contour integrals (principal value integration). Although this is not without alternatives [2], I'ld rather introduce another function than change step(). -richy. [1] https://www.ginac.de/pipermail/ginac-devel/2020-June/002464.html [2] https://en.wikipedia.org/wiki/Heaviside_step_function#Zero_argument