Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scientific Notation for Inputs | enhancement #26

Open
Randall-Scharpf opened this issue Jul 1, 2021 · 0 comments
Open

Scientific Notation for Inputs | enhancement #26

Randall-Scharpf opened this issue Jul 1, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@Randall-Scharpf
Copy link
Contributor

Description

While extremely large numbers (like the mass of the sun), are output in metric using scientific notation, inputs are not recognized as scientific notation and instead must be directly entered as a decimal.
image
This shows the method by which an input must be given in order to elicit a conversion. However, since no right-minded person would text the mass of the sun over Discord in such a way, we should expect never to make such a conversion. Instead, we should expect to find scientific notation.

Example Failure Cases

  • The form A.BCeD
    image
  • The form A.BCe+D
    image
  • The form A.BC*10^D
    image
  • The form A.BC*!0^+D
    image

Other similar forms exist and can (and perhaps should) be supported.

Proposed Solutions

  • Expand the regex for finding numbers, and add any addition "pythonizing" between the string catching and float conversion (current "pythonizing" consists of a forced conversion from the comma to the period as radix)
  • Import a library for parsing numbers from strings

Potential Related Issues

  • No idea what sort of licensing requirements or such would come with adding a library
@Shaquu Shaquu added the enhancement New feature or request label Jul 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants