Bug 12514 - Calculator program, percentage operations
: Calculator program, percentage operations
Status: NEW
Product: Maemo 5 Community SSU
calculator
: stable
: N900 Maemo
: Unspecified normal (vote)
: ---
Assigned To: Pali Rohár
: general
:
:
:
:
  Show dependency tree
 
Reported: 2011-11-29 15:05 UTC by arcean
Modified: 2012-03-30 17:59 UTC (History)
4 users (show)

See Also:


Attachments
stock ui (78.28 KB, image/png)
2011-11-29 16:59 UTC, Christian Ratzenhofer
Details
cssu ui (76.82 KB, image/png)
2011-11-29 17:01 UTC, Christian Ratzenhofer
Details


Note

You need to log in before you can comment on or make changes to this bug.


Description arcean (reporter) 2011-11-29 15:05:30 UTC
SOFTWARE VERSION: 
21.2011.38-1Tmaemo1
and
21.2011.38-1Smaemo1

EXACT STEPS LEADING TO PROBLEM: 
(Explain in detail what you do (e.g. tap on OK) and what you see (e.g. message
Connection Failed appears))
1. Start Calculator app.
2. Type "100-10%"

EXPECTED OUTCOME:
According to almost all desktop/engineer calculators the result should be "90".

ACTUAL OUTCOME: 
The result is "99".

REPRODUCIBILITY: 
always

EXTRA SOFTWARE INSTALLED: 

OTHER COMMENTS: 
http://www.forums.internettablettalk.com/showpost.php?p=1087495&postcount=4909
http://www.forums.internettablettalk.com/showpost.php?p=1087503&postcount=4910
Comment 1 Andre Klapper maemo.org 2011-11-29 15:17:09 UTC
http://www.forums.internettablettalk.com/showpost.php?p=1087503&postcount=4910
describes why this is not an error.

So why did you file this bug report?
Comment 2 Andrew Flegg maemo.org 2011-11-29 15:25:15 UTC
(In reply to comment #1)
> http://www.forums.internettablettalk.com/showpost.php?p=1087503&postcount=4910
> describes why this is not an error.

I would be surprised if the syntax of "100 - 10%100" described there matches
the behaviour of the default PR1.3 calculator. If it does, this is NOTABUG;
however the Calculator replacement should be feature compatible with the stock
Calculator.

The "steps to reproduce" should refer to the stock Calculator (and the version
of Maemo it's tested on) and the "expected outcome" is "same on both", IMNSHO.

Unfortunately, I don't have an N900 with me to test. The Harmattan calculator
doesn't provide a %ge operation.
Comment 3 Christian Ratzenhofer 2011-11-29 16:59:58 UTC
Created an attachment (id=3438) [details]
stock ui
Comment 4 Christian Ratzenhofer 2011-11-29 17:01:27 UTC
Created an attachment (id=3439) [details]
cssu ui

both times I entered exactly this on the ui keyboard

2^(-1.5
2^(1.5
100 - 10 %
100 - 10 % 100
Comment 5 Pali Rohár 2011-11-29 20:26:30 UTC
Percentage bug should be fixed by this commit:
http://gitorious.org/community-ssu/osso-calculator/commit/793422e3a353885d6bda2e090a3e8ce50ce73d7f

@Christian Ratzenhofer:
Power function bug "2^(-1.5" is reported here: https://bugs.maemo.org/12515
Comment 6 Christian Ratzenhofer 2012-03-30 17:58:29 UTC
Reopening based on http://talk.maemo.org/showpost.php?p=1152320&postcount=187

1000-10 % ends as 990

whilst the stock calculator gives 900
1000-10 % 100 gives 990 in the stock calculator aswell

a few more examples:
stock: 10 + 200 + 50% = 310
cssu: 10 + 200 + 50% = 260
stock: (10 + 200) + 50% = 315
cssu: (10 + 200) + 50% = 260


so it seems that if the stock calculator misses the 2nd value for % it takes
the one in front instead.