Re: Kcalc computing wrong?
Norbert Zawodsky <[email protected]> Sun, 15 Sep 2019 22:35:46 +0200
| Newsgroups | gmane.comp.kde.linux |
|---|---|
| Message-ID | <[email protected]> |
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Am 15.09.19 16:17 schrieb Dale:<br>
</div>
<blockquote type="cite"
cite="mid:[email protected]">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<div class="moz-cite-prefix">Alexander Puchmayr wrote:<br>
</div>
<blockquote type="cite" cite="mid:7136421.e0itIW1HxN@zeus">
<pre wrap="">Hi there,
I just encountered an article about the oddities of number 42 and that
(-80538738812075974)^3 + 80435758145817515^3 + 12602123297335631^3 = 42.
I tried to verify in Kcalc, but got different result. I tried the same in
python, where I got the correct result of 42.
Try easier numbers, lets say 3^3 - 3^3 + 1, which should give 1, but kcalc
says 28.
Reproduce:
Press keys: 3, x^3, - , 3, x^3, +, 1, enter --> 28
Also (with intermediate results in square brackets):
2^3 [8] + 2^2 [4] +[8] 2 = 10 (should be 14).
2^3 [8] + 2^2 [4]+ 2^2 [4] + 2^2 [4] +[8] 1 = 9 (should be 21)
It seems like as if the result of x^2 and x^3 are ignored in consecutive
additions/substractions.
Kcalc version 18.12.3
Can anybody verify with other versions?
Regards
Alex
</pre>
</blockquote>
<br>
<br>
I did the part right below Reproduce and got 28 as well. You
would think the first two would result in 0 and adding 1 would
give a result of 1. Thing is, different calculators have
different ways of doing things which is where parenthesis come
in. I have a old Radio Shack EC-4020 that has its own way of
calculating things. It describes its methods in detail in the
manual that comes with it. I've bought newer versions of
calculators and they to have their own way. It seems Kcalc has
its own way of doing things as well. I'm on version 19.04.3.
<style type="text/css">
p, li { white-space: pre-wrap19.04.3</style><br>
<br>
Strange things like this happen. This is where a human being
sitting down and doing it on paper comes in handy. <br>
<br>
Dale<br>
<br>
:-) :-) <br>
</blockquote>
<p><font face="Open Sans">I just tried with kcalc 17.12.3 on my
machine. Results:<br>
</font></p>
<p><font face="Open Sans">3, x^3, - , 3, x^3, +, 1, enter --> <b>1</b></font></p>
<p><font face="Open Sans">2^3 + 2^2 + 2 = <b>14</b></font></p>
<p><font face="Open Sans">2^3 + 2^2 + 2^2 + 2^2 +1 = <b>21</b><b><br>
</b></font></p>
<p><font face="Open Sans">Seems everything is okay here...</font></p>
<p><font face="Open Sans">Norbert<br>
</font></p>
<p><font face="Open Sans"></font><br>
</p>
</body>
</html>