Live data from Hacker News

999999999999999 - 999999999999997

google.com

21–30 of 107 posts

Re: 999999999999999 - 999999999999997

#21
post #3

Maybe I'm just getting incurably academic, but I think "I found a bug!" is not nearly as interesting as "I found a bug!" and one of: 1) It affects millions of people! 2) It affects large amounts of money! 3) It is a great example of a new or rare class of bug. Here's how you can avoid introducing similar bugs into your code! Here's how we can detect these things automatically! etc. Here, the only thing that springs t…

I guess it's just a reminder not to trust a search engine with your fiduciary responsibilities?

http://www.brillig.com/debt_clock/

I think you still have a few orders of magnitude to go before that becomes a real problem.

Re: 999999999999999 - 999999999999997

#22
post #12

Earlier quoted context omitted.

It's not really overflow. It's more like insufficient precision.

Insufficient precision implies too little bits to store the number in. These are unsigned integers, they could have been represented as integers in a 64 bit unsigned value, if the number of bits in the variable destined to hold the input is not enough and you keep on working as though there are that's overflow al right. It should have simply thrown an error: operand too large. I have a dark brown feeling that it won'…

This bug has been there for years. So I don't think they'll fix it all that fast.

They use floats for everything, not ints.

Re: 999999999999999 - 999999999999997

#23
post #3

Maybe I'm just getting incurably academic, but I think "I found a bug!" is not nearly as interesting as "I found a bug!" and one of: 1) It affects millions of people! 2) It affects large amounts of money! 3) It is a great example of a new or rare class of bug. Here's how you can avoid introducing similar bugs into your code! Here's how we can detect these things automatically! etc. Here, the only thing that springs t…

This is clearly a floating point precision problem. It happens when are no bits small enough on the mantissa to express the difference between the two values.

Check out: http://www.google.com/search?q=999999999999999+*+1 this overflows into the next integer as well.

Re: 999999999999999 - 999999999999997

#24
post #10

Earlier quoted context omitted.

I found it on 4chan.

I don't even want to know why it was posted there...

The thing about 4chan is that there's no order. That means not even chaos is an absolute must. Pictures of transsexuals and underage girls and people covered in fecal matter go alongside programming jokes, debates about Obama, and discussions of existentialism. This was closer to the latter.

I don't go on 4chan often - once or twice a year at most - but when I do, it's to get that completely random mix of things all at once. Every time, I come away with 3-4 things I didn't know/hadn't thought of before. This was one of the things I found this time.

Re: 999999999999999 - 999999999999997

#25
post #10

Earlier quoted context omitted.

I found it on 4chan.

I don't even want to know why it was posted there...

Because it looks cool, when it is in fact an utterly unremarkable case of insufficient precision/float vs double.

But if you're not a programmer you don't know a float from a double, and it just looks so neat and funny that google screwed up.

And because it's so funny it showed up on 4Chan, then on reddit and now here too.

Re: 999999999999999 - 999999999999997

#26

Earlier quoted context omitted.

I don't even want to know why it was posted there...

Because it looks cool, when it is in fact an utterly unremarkable case of insufficient precision/float vs double. But if you're not a programmer you don't know a float from a double, and it just looks so neat and funny that google screwed up. And because it's so funny it showed up on 4Chan, then on reddit and now here too.

Yet it's being remarked upon.

Perhaps it's not a unique case - icey's link explained the cause, which incidentally I hadn't known before posting this - but it's still one that's perhaps worth a conversation for some people.

Re: 999999999999999 - 999999999999997

#27
post #22

Earlier quoted context omitted.

Insufficient precision implies too little bits to store the number in. These are unsigned integers, they could have been represented as integers in a 64 bit unsigned value, if the number of bits in the variable destined to hold the input is not enough and you keep on working as though there are that's overflow al right. It should have simply thrown an error: operand too large. I have a dark brown feeling that it won'…

This bug has been there for years. So I don't think they'll fix it all that fast. They use floats for everything, not ints.

That would explain it quite nicely, the decimal64 implementation of the ieee floating point data tops out at 16 digits.

edit: actually, it doesn't, the input above is 15 digits long.

Re: 999999999999999 - 999999999999997

#28
post #24

Earlier quoted context omitted.

I don't even want to know why it was posted there...

The thing about 4chan is that there's no order. That means not even chaos is an absolute must. Pictures of transsexuals and underage girls and people covered in fecal matter go alongside programming jokes, debates about Obama, and discussions of existentialism. This was closer to the latter. I don't go on 4chan often - once or twice a year at most - but when I do, it's to get that completely random mix of things all…

I think I could have done without those mental images, thank you.
Post reply on HN