Keep cumulated error negligible for rapidly increasing functions

Authored by yurchor on Oct 26 2019, 6:41 PM.

Description

Keep cumulated error negligible for rapidly increasing functions

Summary:
The current scheme violates Runge-Kutta condition on error O(h^4) when dy is too high. This leads to visible shifting and discontinuities on the plots of integrals for e^x^2, e^abs(x), etc.

BUG: 341256

Test Plan:

  1. Compile and install KmPlot.
  2. Create the Cartesian plot "f(x) = e^x^2".
  3. Switch to the "Integral" tab and tick the "Show integral" item.
  4. Try to change the scale (Ctrl+mouse wheel). The integral curve should be plotted as expected (no discontinuities, no extra lines on Ox).

f(x)=e^x^2 and its integral

Before the patch:


After the patch:

Reviewers: KDE Edu

Subscribers: aacid, cfeck, kde-edu

Tags: KDE Edu

Differential Revision: https://phabricator.kde.org/D24972

Details

Committed
yurchorJan 15 2020, 6:59 PM
Differential Revision
D24972: Keep cumulated error negligible for rapidly increasing functions
Parents
R334:8852a98693e9: Don't use 0 as flag
Branches
Unknown
Tags
Unknown