Go to the FreeLists Home Page Home Signup Help Login
 



[openbeos] || [Date Prev] [06-2003 Date Index] [Date Next] || [Thread Prev] [06-2003 Thread Index] [Thread Next]

[openbeos] Re: The Scientific Method aka Bresenham NewsletterArticle

  • From: Michael Noisternig <michael.noisternig@xxxxxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Sun, 08 Jun 2003 13:59:57 +0200
are you imposing that the division need be performed on _each_ iteration?

y = y1 + (y2-y1)*x/(x2-x1)

is a linear function

y = ax + b

to keep the error within the precisional error margins of the media used (i.e. 
not to have
any additional cumulative error) all you need to do is to use a non-incremental 
evaluator,
and you end up with 1x multiplication and 1x addition per iteration, no 
unit-errors
whatsoever*, and last but not least you end up with no conditions in the inner 
loop.

Actually it makes no difference whether you do it Mr. Phipps' way or your linear function way because the _absolute_ error is the same in both cases. The multiplication in your linear function also multiplies the error in the LSB which then is the same as the accumulated error by subsequent additions.







[ Home | Signup | Help | Login | Archives | Lists ]

All trademarks and copyrights within the FreeLists archives are owned by their respective owners.
Everything else ©2007 Avenir Technologies, LLC.