Skip to content
This repository was archived by the owner on Mar 29, 2023. It is now read-only.

Incorrect result of Prime Number module with negative number input #106

@studyeveryday7

Description

@studyeveryday7

Describe the bug

In the Prime Number module, when input a negative number like -1, then it will output will be Prime(-1).

Expected behavior

I expected the result should use the absolute input.(That mean when I input -1, the output should be Prime(1) = 2). Maybe change the input negative number to positive number can solve it, and add a dialog to show the reason.

To reproduce

  1. Open NCalc+ (Which is build from latest source code)
  2. Go to Prime module
  3. Input -1
  4. Click the evaluate bottom
  5. Incorrect result has been displayed

Configuration

  • Android version 9
  • device MI 8 Lite

Screenshots

image

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions