Bug 192485 - wrong calculation in the equation solver
Summary: wrong calculation in the equation solver
Status: RESOLVED FIXED
Alias: None
Product: kalzium
Classification: Applications
Component: general (show other bugs)
Version: 2.5.0
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Kalzium Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-12 22:25 UTC by Frederic MERAL
Modified: 2018-11-03 04:34 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frederic MERAL 2009-05-12 22:25:44 UTC
Version:           2.2.1 (using 4.2.2 (KDE 4.2.2), Mandriva Linux release 2009.1 (Cooker) for i586)
Compiler:          gcc
OS:                Linux (i686) release 2.6.29.1-desktop-4mnb

In the Equation solver, if we enter the following equation : 
a MnO4[-] + b Cl[-] + c H[+] -> d Mn[2+] + e Cl2 + f H2O

the solver gives the following answer which is false as regards Cl2 :
1 MnO4- + 5 Cl- + 8 H+ -> 1 Mn2+ + 2 Cl2 + 4 H2O (1 Cl is missing)

if we replace e by the value 5 in the equation, then the solver gives the correct answer (conservation of matter) :
2 MnO4- + 10 Cl- + 16 H+ -> 2 Mn2+ + 5 Cl2 + 8 H2O

I have not the code but I suspect that the problem might be that in the initial equation the result for Cl2 is 5/2 rounded down to 2 in order to have an integer, whereas in this type of situation all the coefficient should be multiplied by 2 to give the correct answer.
Comment 1 Andrew Crouthamel 2018-11-02 22:59:13 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 2 Frederic MERAL 2018-11-03 04:34:07 UTC
I have re-tested the equation balancer in Kalzium version 2.5.0 on Fedora platform with the equation a MnO4[-] + b Cl[-] + c H[+] -> d Mn[2+] + e Cl2 + f H2O and it gives the correct answer : 2 MnO4- + 10 Cl- + 16 H+ -> 2 Mn2+ + 5 Cl2 + 8 H2O
So, as regards this equation, the bug seems to be solved and I change the status to Resolved and Fixed
Thank you all developers for solving this bug.
Best regards,
Frederic MERAL