Skip to content

Conversation

@Efnilite
Copy link
Member

@Efnilite Efnilite commented Jun 8, 2025

Problem

Scientific notation is a way of easily representing large numbers, such as 1.23e+9 representing 1 230 000 000. Most major languages have support for representing numbers like this, but Skript doesn't :(

Solution

Updates the existing regex for integer and rational numbers to include allowing the use of the format X[eE][+-]Y. No implementation changes were necessary, as the existing methods allow this change to pass the tests.

Testing Completed

scientific notation.sk test added, manually confirmed to be working.

Supporting Information


Completes: #4553
Related: none

@Efnilite Efnilite added the enhancement Feature request, an issue about something that could be improved, or a PR improving something. label Jun 8, 2025
@Efnilite Efnilite requested review from a team and sovdeeth as code owners June 8, 2025 22:11
@Efnilite Efnilite requested review from Burbulinis and removed request for a team June 8, 2025 22:11
@skriptlang-automation skriptlang-automation bot added the needs reviews A PR that needs additional reviews label Jun 8, 2025
@Efnilite Efnilite changed the base branch from master to dev/feature June 8, 2025 22:11
@Efnilite Efnilite linked an issue Jun 8, 2025 that may be closed by this pull request
1 task
@Efnilite Efnilite moved this to In Review in 2.12 Releases Jun 8, 2025
@github-project-automation github-project-automation bot moved this from In Review to Awaiting Merge in 2.12 Releases Jun 9, 2025
@skriptlang-automation skriptlang-automation bot added feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version. and removed needs reviews A PR that needs additional reviews labels Jun 9, 2025
@Efnilite Efnilite merged commit a233cfe into dev/feature Jun 12, 2025
6 checks passed
@skriptlang-automation skriptlang-automation bot added the completed The issue has been fully resolved and the change will be in the next Skript update. label Jun 12, 2025
@github-project-automation github-project-automation bot moved this from Awaiting Merge to Done in 2.12 Releases Jun 12, 2025
@skriptlang-automation skriptlang-automation bot removed the feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version. label Jun 12, 2025
@Efnilite Efnilite deleted the feature/scientific-notation branch August 2, 2025 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

completed The issue has been fully resolved and the change will be in the next Skript update. enhancement Feature request, an issue about something that could be improved, or a PR improving something.

Projects

Status: Done - Released

Development

Successfully merging this pull request may close these issues.

Re-introduce Scientific Notation

4 participants