Skip to content

Incorrect parsing of numbers in scientific notation (e.g., 1e-7) #96

@kohlerdominik

Description

@kohlerdominik

Description:
The library currently fails to correctly parse numbers using scientific notation when they contain a sign or are immediately followed by digits. For example, the expression 1e-7 is incorrectly lexed as:

  1. The number 1
  2. The constant e (Euler's number)
  3. The subtraction operator -
  4. The number 7

This results in a calculation of 1 * e - 7 instead of 10^-7. This behavior also affects capital E and positive exponents (e.g., 1e+7).

Javascript uses scientific notation for numbers smaller than 0.000001, which means native numbers created by javascript smaller than 1e-6 do not work with this package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions