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

Large integer literals overflow without warning/error #2018

Closed
p6rt opened this issue Aug 5, 2010 · 7 comments
Closed

Large integer literals overflow without warning/error #2018

p6rt opened this issue Aug 5, 2010 · 7 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Aug 5, 2010

Migrated from rt.perl.org#77014 (status was 'resolved')

Searchable as RT77014$

@p6rt
Copy link
Author

p6rt commented Aug 5, 2010

From sohtil@gmail.com

Hi!

Integer literals >int32 seem to overflow on my machine without any
warning or error.

Lithos

This is Rakudo Perl 6, version 2010.07-79-g19931fe built on parrot 2.6.0 r48225

Copyright 2008-2010, The Perl Foundation

$ ./perl6

1000000000
1000000000
10000000000
1410065408
100000000000
1215752192
1000000000000
-727379968
10000000000000
1316134912
100000000000000
276447232
1000000000000000
-1530494976
10000000000000000
1874919424
100000000000000000
1569325056
1000000000000000000
-1486618624
10000000000000000000
-1981284352
100000000000000000000
1661992960
1000000000000000000000
-559939584
10000000000000000000000
-1304428544
100000000000000000000000
-159383552
1000000000000000000000000
-1593835520
10000000000000000000000000
1241513984
100000000000000000000000000
-469762048
1000000000000000000000000000
-402653184
10000000000000000000000000000
268435456
100000000000000000000000000000
-1610612736
1000000000000000000000000000000
1073741824
10000000000000000000000000000000
-2147483648
100000000000000000000000000000000
0
1000000000000000000000000000000000
0
1000000000.WHAT
Int()
10000000000.WHAT
Int()
1000000000000000000000000000000000.WHAT
Int()

@p6rt
Copy link
Author

p6rt commented Dec 28, 2010

From leif.dyvik@gmail.com

Hello!

I use Rakudo git. At the perl6 prompt I type the number 600851475143,
and get -443946297.

If I type​: "600851475143" + 0, it works fine.

I use Ubuntu 10.10, 32bit.

--
-- Leif Dyvik

@p6rt
Copy link
Author

p6rt commented Jan 6, 2011

@Kodiologist - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Jan 6, 2011

From @Kodiologist

The problem also exists on 64-bit machines (although it only manifests
itself for larger inputs, of course).

@p6rt
Copy link
Author

p6rt commented Jan 6, 2011

@Kodiologist - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented May 29, 2012

From @moritz

We now have proper big integers, and plenty of test coverage for them.
Closing ticket.

@p6rt
Copy link
Author

p6rt commented May 29, 2012

@moritz - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed May 29, 2012
@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