Forum Discussion
Altera_Forum
Honored Contributor
12 years agofixed point precision
Peace! I want ask about the number of bits shoud I use in an fixed_point number to obtein the good precision, precision of distance eclidean. some detail: I want to determine an vector of ...
Altera_Forum
Honored Contributor
12 years agoIf you sum N digital values you generally need log2(N) (approximate to the next integer) more bits to store the result. Otherwise you possibly overflow the sum or lose information.
The same applies to the average of N values: you need log2(N) more bits if you want to have the full precision; consider, for example, that any division by 2 introduces one more decimal bit.