Rounding errors
#1

Just to emphasise that rounding errors aren't just limited to calculators here's something culled from the Interweb...

Quote:
There are mutterings about Motorola doing an unannounced, covert update
on their Droid camera because so many people are reporting that the
autofocus, which has been a bit rubbish, is now suddenly working.

The actual situation is (I think) quite funny.

Android Engineer, Dan Morrill said:
There's a rounding-error bug in the camera driver's autofocus routine
(which uses a timestamp) that causes autofocus to behave poorly on a
24.5-day cycle. That is, it'll work for 24.5 days, then have poor
performance for 24.5 days, then work again.
The 17th is the start of a new "works correctly" cycle, so the devices
will be fine for a while. A permanent fix is in the works.


#2

24.5 days means 2^31 [ms]

It is probably an old singed and unsigned or wrap-round bug but not rounding errors.

The source or related article is Slashdot IT Story

#3

So it isn't so much a rounding error as an integer overflow.

Still, I cannot fathom a reason why the autofocus code would care about the time.
Especially at this level of accuracy -- maybe at the hour mark to attempt to judge day and night but not at the ms level.

- Pauli

#4

Quote:
Still, I cannot fathom a reason why the autofocus code would care about the time.
Especially at this level of accuracy -- maybe at the hour mark to attempt to judge day and night but not at the ms level.

I have minimal knowledge of how autofocus works, but that never stopped me from speculating before.... :)

The routine might do something like this:


- Check to focus
- Move the focus knob for a little while.
- Recheck the focus.
- If you've passed the focus point, then interpolate based on how
long you were turning the knob and go back accordingly.
Now if you get the time from a millisecond counter and mistakenly interpret it as a signed value, you'll think that the time interval was negative and all hell breaks loose.

Again, this is purely speculation, but I think it illustrates how time might factor into their calculations.

#5

Quote:
Now if you get the time from a millisecond counter and mistakenly interpret it as a signed value, you'll think that the time interval was negative and all hell breaks loose.
In this case, we actually have an algorithmic error.

Luiz (Brazil)



Possibly Related Threads…
Thread Author Replies Views Last Post
  HP Prime program: rounding to a fraction Patrice 3 1,663 10-31-2013, 06:16 AM
Last Post: Joe Horn
  HP Prime: Rounding error in determinant Stephan Matthys 3 1,607 10-25-2013, 09:29 PM
Last Post: Walter B
  HP Prime editor errors Alberto Candel 0 955 10-22-2013, 01:34 AM
Last Post: Alberto Candel
  Rounding of 10^x Olivier De Smet 8 2,500 08-28-2013, 06:33 AM
Last Post: Dieter
  Paper on the errors in HP Calculators vs some older computer processors Les Koller 3 1,730 08-19-2013, 12:37 PM
Last Post: Mike Morrow
  Estimating Accumulated Rounding Errors Egan Ford 13 3,197 08-16-2012, 01:49 PM
Last Post: Egan Ford
  HP-28S Syntax Errors William N Strew 7 2,484 07-15-2012, 05:09 PM
Last Post: Luiz C. Vieira (Brazil)
  Some errors about NOMAS, (c) of 71B ROM images Christoph Giesselink 4 1,743 06-13-2012, 04:10 AM
Last Post: Valentin Albillo
  Errors reading with a HP 82153A Barcode Optical Wand aurelio 22 5,694 04-04-2012, 05:19 PM
Last Post: Les Wright
  WP34s: number display and rounding Dieter 4 1,411 10-14-2011, 05:11 PM
Last Post: Marcus von Cube, Germany

Forum Jump: