[GH-ISSUE #260] Calculator hangs/crashes when performing certain complex calculations. #105

Open
opened 2026-05-06 13:15:27 +02:00 by BreizhHardware · 0 comments

Originally created by @LemmusLemmus on GitHub (Jun 28, 2022).
Original GitHub issue: https://github.com/UpsilonNumworks/Upsilon/issues/260

Describe the bug
When performing certain complex calculations, the calculator becomes extremely slow, and when pressing the "more results" / "three dots" button, the error "The working memory is full. Try again." appears. Additionally, the calculated result is inaccurate.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Calculation'
  2. Enter and run the calculation '((6^(1/5))×ℯ^(2π𝐢/5))^5'.
  3. The calculator will now hang briefly. Sometimes pressing the back button is required to resume usage of the calculator.
  4. Inaccurate results will be displayed (unless the error already appears).
  5. The error appears when pressing the three dots button.

In the math settings, changing the complex format and angle measures do not make a difference.

Expected behavior

  1. The calculation should be relatively quick
  2. No error should appear
  3. The results should be more accurate and the exact result should probably be in polar format instead of cartesian (in the case of the example calculation, the result should preferably be simply '6', but if the exponent in the calculation were for example 4 the result should probably be in polar format).

Screenshots
If applicable, add screenshots to help explain your problem.
image
image
image

Device:

  • Device: n0110, web simulator and Android simulator.
  • Upsilon Version: 1.0.0-dev, (the same error occurs on Omega 1.22.1 and 2.0.0)
  • Upsilon commit: d2084de

Notably, the issue does not occur in the Epsilon 18.2.2 simulator. No hanging/slowdown is experienced, and the three dots menu can be accessed and works as expected. The exact result is however still in cartesian format with an inaccurate approximation.

@fmOOmf has some additional insight into what the problem might be, below is a quick comment they made:

It is as if the calculator wants to use (a+ib) rather rho.exp(i.theta) and it becomes complicated to manage exact expressions.
No difference if "exponential" format chosen for complex numbers display (in settings).
Seems related to GH167. May be a fork on the computation approach a+ib or rho.exp(i.theta) could help ...

Originally created by @LemmusLemmus on GitHub (Jun 28, 2022). Original GitHub issue: https://github.com/UpsilonNumworks/Upsilon/issues/260 **Describe the bug** When performing certain complex calculations, the calculator becomes extremely slow, and when pressing the "more results" / "three dots" button, the error "The working memory is full. Try again." appears. Additionally, the calculated result is inaccurate. **To Reproduce** Steps to reproduce the behavior: 1. Go to 'Calculation' 2. Enter and run the calculation '((6^(1/5))×ℯ^(2π𝐢/5))^5'. 3. The calculator will now hang briefly. Sometimes pressing the back button is required to resume usage of the calculator. 4. Inaccurate results will be displayed (unless the error already appears). 5. The error appears when pressing the three dots button. In the math settings, changing the complex format and angle measures do not make a difference. **Expected behavior** 1. The calculation should be relatively quick 2. No error should appear 3. The results should be more accurate and the exact result should probably be in polar format instead of cartesian (in the case of the example calculation, the result should preferably be simply '6', but if the exponent in the calculation were for example 4 the result should probably be in polar format). **Screenshots** If applicable, add screenshots to help explain your problem. ![image](https://user-images.githubusercontent.com/63229554/176184529-9adf2a24-5785-4987-9966-2ec3bfabcb68.png) ![image](https://user-images.githubusercontent.com/63229554/176184581-4f794759-c53d-4142-886f-076641b36460.png) ![image](https://user-images.githubusercontent.com/63229554/176184647-b69e9ad6-7baa-429f-99b4-ac60364cc8fb.png) **Device:** - Device: n0110, web simulator and Android simulator. - Upsilon Version: 1.0.0-dev, (the same error occurs on Omega 1.22.1 and 2.0.0) - Upsilon commit: d2084de Notably, the issue does not occur in the Epsilon 18.2.2 simulator. No hanging/slowdown is experienced, and the three dots menu can be accessed and works as expected. The exact result is however still in cartesian format with an inaccurate approximation. @fmOOmf has some additional insight into what the problem might be, below is a quick comment they made: > It is as if the calculator wants to use (a+ib) rather rho.exp(i.theta) and it becomes complicated to manage exact expressions. No difference if "exponential" format chosen for complex numbers display (in settings). Seems related to GH167. May be a fork on the computation approach `a+ib` or `rho.exp(i.theta)` could help ...
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Upsilon#105
No description provided.