Added new function to compute the new error given the
descritor's weight.

Signed-off-by: Paulo Hack <ph_hack@hotmail.com>