News for hackers. Stuff that matters.
Re:999999999999999 - 999999999999997 by jacquesm on Monday August 24, 2009 @03:22PM (#783015)
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 by tripa on Monday August 24, 2009 @03:25PM (#783024)
It's not really overflow. It's more like insufficient precision.
Re:999999999999999 - 999999999999997 by jacquesm on Monday August 24, 2009 @03:29PM (#783037)
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 by tripa on Monday August 24, 2009 @05:32PM (#783435)
My definition of "overflow" is along the lines of "value is too big to be represented by said type". If they had been using integers, ok. But they're using floats, and floats can hold numbers bigger than that.

It all boils down to what type you consider the entries have, opposed to what Google considers.

Re:999999999999999 - 999999999999997 by jacquesm on Monday August 24, 2009 @06:07PM (#783521)
I did not realize they use floats to represent all types, 64.64 would have been an excellent choice for this and would go a long way to solving the issue reported.
Re:999999999999999 - 999999999999997 by ars on Monday August 24, 2009 @03:33PM (#783062)
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 by jacquesm on Monday August 24, 2009 @03:40PM (#783084)
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 by jballanc on Monday August 24, 2009 @04:37PM (#783278)
...also known as Arithmetic underflow (http://en.wikipedia.org/wiki/Arithmetic_underflow)
Re:999999999999999 - 999999999999997 by wlievens on Monday August 24, 2009 @05:06PM (#783356)
The correct term is quantization, iirc.