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

Use floating-point numbers universally #3335

Closed
nex3 opened this issue Jun 15, 2022 · 1 comment
Closed

Use floating-point numbers universally #3335

nex3 opened this issue Jun 15, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@nex3
Copy link
Contributor

nex3 commented Jun 15, 2022

Sass has never clearly specified its internal number format. Ruby Sass inherited Ruby's support for transparently switching to bignums when numbers got extremely large, and Dart Sass did the same thing initially until Dart dropped support for transparent bignums in 2.0.0. LibSass, on the other hand, has only ever used floating point numbers.

Although we could mandate the implementation of transparent bignums, this would add a substantial amount of implementation complexity and performance overhead since we'd have to do bounds-checking for every operation. Instead, I think just standardizing on double-width floating points makes sense, particularly because the compromises inherent in using floating point numbers everywhere are already well-understood by the web community thanks to JS.

Marking this as a bug because the behavior of large numbers is currently inconsistent in a problematic way.

@nex3 nex3 added the bug Something isn't working label Jun 15, 2022
@nex3
Copy link
Contributor Author

nex3 commented Jun 15, 2022

Oops, looks like #2892 already exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant