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

Rat operations give bogus underflow #5817

Open
p6rt opened this issue Nov 23, 2016 · 2 comments
Open

Rat operations give bogus underflow #5817

p6rt opened this issue Nov 23, 2016 · 2 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Nov 23, 2016

Migrated from rt.perl.org#130155 (status was 'new')

Searchable as RT130155$

@p6rt
Copy link
Author

p6rt commented Nov 23, 2016

From zefram@fysh.org

2e0**-1019
1.78005908680576e-307
2e0**-1020
8.90029543402881e-308
2.0**-1019
1.78005908680576e-307
2.0**-1020
0
0.5**1019
1.78005908680576e-307
0.5**1020
0
1 / (2.0**1019)
1.78005908680576e-307
1 / (2.0**1020)
0

The three ways of computing 2**-1020 from Rat values all bogusly underflow
to zero. As you can see, the exact value is representable in the Num
type, which all of these Rat operations use for their results.

-zefram

@p6rt
Copy link
Author

p6rt commented Nov 24, 2016

From @zoffixznet

MoarVM PR fixing this sent​: MoarVM/MoarVM#442

@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant