On Friday 12 May 2006 05:49, Ray Heasman wrote:

> If you are serious about maintaining precision, then you will do the job
> right using either floating point or fixed point operations. However, it
> would take more operations and would have greater complexity to do it
> right using floating point. In some cases, O(n) operations become
> O(NlogN) or, even worse, the order becomes data dependent, which means
> your processing latency becomes data dependent.

A floating point mean calculation requires:

- A sort, which is O(NlogN) if you're lucky
- A summation, which is O(N)
- A division

The sort is required if you don't want to get _HUGE_ truncation errors.

This should be required reading:
http://docs.sun.com/source/806-3568/ncg_goldberg.html


Peter


-- 
Quake II build tools: http://peter-b.co.uk

v2sw6YShw7$ln5pr6ck3ma8u6/8Lw3+2m0l7Ci6e4+8t4Eb8Aen5+6g6Pa2Xs5MSr5p4
  hackerkey.com
_______________________________________________
Open-graphics mailing list
[email protected]
http://lists.duskglow.com/mailman/listinfo/open-graphics
List service provided by Duskglow Consulting, LLC (www.duskglow.com)

Reply via email to