[Kalzium] [Bug 192485] New: wrong calculation in the equation solver

Frederic MERAL fr.meral at laposte.net
Tue May 12 22:25:48 CEST 2009


https://bugs.kde.org/show_bug.cgi?id=192485

           Summary: wrong calculation in the equation solver
           Product: kalzium
           Version: unspecified
          Platform: unspecified
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
        AssignedTo: kalzium at kde.org
        ReportedBy: fr.meral at laposte.net


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.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Kalzium mailing list