Dan Seitz

36%
Flag icon
The computer was getting an answer of 255 for the same reason computers have trouble keeping track of time: digital memory is finite. The aggression ratings were stored as an 8-digit binary number. Starting at 00000001 and counting down two gave 00000000 and then 11111111 (which is 255 in normal base-10 numbers). Instead of becoming negative, a number stored in a computer will wrap around to being the maximum possible value.
Humble Pi: When Math Goes Wrong in the Real World
Rate this book
Clear rating
Open Preview