Using "unsigned long" for "lnorm" variable that was yet made negative in very first step caused incorrect calculation result. Corrected the type to "long". Signed-off-by: Olli Parviainen <oparviai@iki.fi>