Bug 136479 - KmPlot calculates integrals completely wrong
Summary: KmPlot calculates integrals completely wrong
Status: RESOLVED WORKSFORME
Alias: None
Product: kmplot
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Klaus-Dieter M
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-29 22:22 UTC by Dima Ryazanov
Modified: 2020-04-28 18:09 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot (37.14 KB, image/png)
2006-10-29 22:22 UTC, Dima Ryazanov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dima Ryazanov 2006-10-29 22:22:07 UTC
Version:            (using KDE KDE 3.5.5)
Installed from:    Gentoo Packages
Compiler:          gcc (GCC) 4.1.1 (Gentoo 4.1.1-r1) 
OS:                Linux

1. Enter a function such as f(x) = 1
2. Right click it, and select "Calculate integral"
3. Enter e.g. 0 and 5 as the bounds, and calculate the result

KmPlot says that the integral is 0.02... So far, all integrals I've tried to calculate were completely wrong.
Comment 1 Dima Ryazanov 2006-10-29 22:22:49 UTC
Created attachment 18319 [details]
Screenshot
Comment 2 David Saxton 2006-10-30 22:17:42 UTC
I cannot reproduce this bug using KmPlot from KDE 3.5.5.

Which version of KDE is the KmPlot you are using from? - There were some fixes for integration released in KDE 3.5.3.
Comment 3 David Saxton 2006-10-30 22:30:42 UTC
Sorry, I didn't notice your KDE version was already listed in the bug reported.

I can't reproduce the bug, and assuming you're using KmPlot from KDE 3.5.5, I don't know what specifically is causing it. But it has probably been fixed in trunk (the version that will end up in KDE 4), at least, since that has undergone a lot of changes and fixes.
Comment 4 Dima Ryazanov 2007-04-14 22:44:15 UTC
I'm still getting the same results in KDE 3.5.6 in Kubuntu.
Comment 5 Bram Schoenmakers 2007-05-06 18:51:41 UTC
Surprisingly, a completely different function gives me also a result of 0.002.

f(x)=1/(sqrt(1+x^2)) and integrating from 0 to 1 gives 0.002 while it should be approx. 0.88.
Comment 6 Bram Schoenmakers 2007-05-06 20:20:11 UTC
The fix for bug 121051 seems to cause this problem.
Comment 7 Bram Schoenmakers 2007-05-06 20:30:44 UTC
To be more specific, commit 529192 seems to be the cause.

Reverting it results in a correct result and the area is actually being painted under the function. Currently, only the left and right borders of the area are painted while the inner part remains uncolored.
Comment 8 Armin Berres 2007-09-14 20:39:48 UTC
This bug has also been reported in Debian as #442281.
Comment 9 Eckhart Wörner 2008-12-24 03:18:14 UTC
Can you please recheck whether this bug still appears with kmplot from KDE 4.1 or later?
Comment 10 Hikaru 2009-02-15 19:33:47 UTC
Hi! On KDE 4.2 area plot is calculated correctly with proposed test case and other simple functions.
 
Otherwise I notice a precision (imho) problem with symmetrical function and interval. For example, test f(x) = cos(x) from 0 to pe.. The correct integral should be 0 and not 9,18016e-15.
Another example is f(x) = x from -1 to 1: the area is -5.44534e-15 instead of 0.
Comment 11 Andrew Crouthamel 2018-11-02 04:20:05 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 12 Andrew Crouthamel 2018-11-16 02:46:20 UTC
Dear Bug Submitter,

This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version?

Thank you for helping us make KDE software even better for everyone!
Comment 13 David Hurka 2020-04-28 18:09:18 UTC
This didn’t happen to me so far, and it appears that no one else commented on this over the last year, so it seems this problem is fixed.

However, there is another problem in the area calculation window: The function list is displayed wrong. I will open a new bug for that.