clementwzk / clementwzk/OpenCalc

`1÷1.0E-9 = 1.0E-9` (Scientific notation E is parsed as implicit multiplication)

Open
#628 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Kotlin
Stars
1.5k
Forks
186
PR merge metrics
No merged PRs in 30d

Description

When using scientific notation (the `E` symbol) in the denominator of a division operation, the calculator returns an incorrect result.

The parser appears to be treating the `E` notation as an implicit multiplication operation (`* 10^x`) subject to standard order of operations, rather than evaluating the entire scientific number as a single value.

**To Reproduce**
1. Input the expression `1÷1.0E-9`. The value `1.0E-9` can be copied from previous result and pasted into the expression.
2. The result will be `1.0E-9`, which is incorrect.

**Expected behavior**
The result should be `1.0E+9`

**Smartphone:**
- Device: Honor X8b
- OS: Android 14
- App version 3.1.4 (52)
- Language English

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing `1÷1.0E-9` in the Android calculator and trace the parser handling of scientific notation in the denominator. Verify the result against the expected `1.0E+9`, including the pasted value scenario, and add coverage for this expression if the project’s tests provide a suitable parser test location.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.