Bug 379821

Summary: Exponent button (x*10y) only works with numbers entered immediately previously
Product: [Applications] kcalc Reporter: Jonathan Cottrill <kde-bugzilla>
Component: generalAssignee: Evan Teran <evan.teran>
Status: RESOLVED FIXED    
Severity: wishlist CC: gabriel.barrantes.dev, kde-bugzilla, lueck
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Jonathan Cottrill 2017-05-14 16:24:08 UTC
KCalc version 17.04.0, with KDE Frameworks 5.32.0 and Qt 5.7.1.

If you enter a number with the keyboard or application buttons, the Exponent (x*10y) button works appropriately; example:

1. Enter 2 in KCalc
2. Press x*10y button
3. Observer 2e0 in display

However, if the current number was not entered immediately previously, it is "lost" (treated as zero).

Issue #1: Pasted value

1. Copy single character 2 to clipboard
2. Paste into KCalc
3. Press x*10y button
4. Observe result is 0e0, *NOT* 2e0, as expected

Issue #2: Result of prior calculation (perhaps arguable, as other calculators treat this case in different ways)

1. Add 1 and 1
2. Observe result is 2
3. Press x*10y button
4. Observe result is 0e0, *NOT* 2e0, as expected
Comment 1 Burkhard Lück 2017-05-15 04:00:28 UTC
confirmed in master build from sources
Comment 2 Christoph Feck 2017-05-15 11:03:36 UTC
I just checked my CASIO fx calculator, and it also allows this 'EXP' key only when entering numbers, it does not work with previous results.
Comment 3 Gabriel Barrantes 2024-04-05 23:33:47 UTC
Input display added in https://invent.kde.org/utilities/kcalc/-/merge_requests/67 allows to edit the entry when the first argument is missing.