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

Handle exponential floats #15

Open
zoryamba opened this issue Mar 1, 2024 · 0 comments
Open

Handle exponential floats #15

zoryamba opened this issue Mar 1, 2024 · 0 comments

Comments

@zoryamba
Copy link

zoryamba commented Mar 1, 2024

Hello.
Thanks for great library. It ensures good compression results on great performance.

Only issue i faced - compressing exponential numbers.
For integers with positive exponent it seems to work correct, but produces huge strings:

console.log(stringify(1e+123));
// ¢D6NHK4g4X000000000000000000000000000000000000000000000000000000000000

For negative exponent it produces wrong output:

console.log(stringify(1e-123));
// £0.0

I'll fix this and provide MR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant