Kaydet (Commit) 52dace9a authored tarafından Regina Henschel's avatar Regina Henschel Kaydeden (comit) Kohei Yoshida

fdo#37326: Sign number must be either 1 or -1, never 0.

This fixes incorrect result with LINEST cell function.
Signed-off-by: 's avatarKohei Yoshida <kyoshida@novell.com>
üst b8db01a1
......@@ -1978,14 +1978,10 @@ double lcl_TGetColumnSumProduct(ScMatrixRef pMatA, SCSIZE nRa,
return fResult;
}
// no mathematical signum, but used to switch between adding and subtracting
double lcl_GetSign(double fValue)
{
if (fValue < 0.0)
return -1.0;
else if (fValue > 0.0)
return 1.0;
else
return 0.0;
return (fValue >= 0.0 ? 1.0 : -1.0 );
}
/* Calculates a QR decomposition with Householder reflection.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment