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

Int/Int gives bogus underflow #5816

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

Int/Int gives bogus underflow #5816

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

Comments

@p6rt
Copy link

p6rt commented Nov 23, 2016

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

Searchable as RT130154$

@p6rt
Copy link
Author

p6rt commented Nov 23, 2016

From zefram@fysh.org

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

For 1/(2**1020) to underflow to zero is bogus. As you can see, the
exact value of the operation is available in the Num type. Both of the
Int/Int divisions produce Num values.

-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