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

Denoise BigInt conversion #55067

Closed
nopria opened this issue Jul 8, 2024 · 1 comment
Closed

Denoise BigInt conversion #55067

nopria opened this issue Jul 8, 2024 · 1 comment

Comments

@nopria
Copy link

nopria commented Jul 8, 2024

julia> BigInt(3.453e78)

returns

34530000000000000 90829207640410620202184021047720495530415184879687805108748288

but, as we all know, the digits after the space (added by me) are arbitrary noise which could (and maybe should) be set to zero.

I'm aware that such noise has a precise reason in the way numbers are represented in a computer, but I think setting the noise digits to zero would nonetheless be an improvement.

Have a look at what has been done in this case.

@nopria nopria changed the title Denoise Denoise BigInt Jul 8, 2024
@nopria nopria changed the title Denoise BigInt Denoise BigInt conversion Jul 8, 2024
@sgaure
Copy link

sgaure commented Jul 8, 2024

It's not really noise. They are deterministic digits due to limited precision in the Float64 literal. You can easily increase the precision and remove these digits with BigInt(big"3.453e78").

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

3 participants