Live data from Hacker News

999999999999999 - 999999999999997

google.com

11–20 of 107 posts

Re: 999999999999999 - 999999999999997

#11
post #9
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 was curious as to what caused this. Posting to HN seemed like the fastest way to get an answer.

Clearly someone wasn't using 'bignum' when they should have.

Pretty sloppy to not even detect overflow on the input.

another one:

http://www.google.com/#q=999999999999999999+-+90000000000000...

Re: 999999999999999 - 999999999999997

#12
post #9

Earlier quoted context omitted.

I was curious as to what caused this. Posting to HN seemed like the fastest way to get an answer.

Clearly someone wasn't using 'bignum' when they should have. Pretty sloppy to not even detect overflow on the input. another one: http://www.google.com/#q=999999999999999999+-+90000000000000...

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

Re: 999999999999999 - 999999999999997

#14
post #12

Earlier quoted context omitted.

Clearly someone wasn't using 'bignum' when they should have. Pretty sloppy to not even detect overflow on the input. another one: http://www.google.com/#q=999999999999999999+-+90000000000000...

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't be long before it does though :)

Re: 999999999999999 - 999999999999997

#16
post #9
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 was curious as to what caused this. Posting to HN seemed like the fastest way to get an answer.

Interestingly, you also created a top Google result for this search term (indexed in around 10 minutes):

http://www.google.com/search?hl=en&client=safari&rls...

Post reply on HN