To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=47724





------- Additional comments from [EMAIL PROTECTED] Mon Jun 25 13:47:53 +0000 
2007 -------
Great, that looks more like what I appreciate :-)

For Excel compatibility (they count a "null elements" as division by zero in
these cases) in ScVar() it should be

if( nValCount <= 1.0 )
    SetError( errDivisionByZero );
PushDouble( nVal / (nValCount - 1.0));


For ScStDev() it should be

if( nValCount <= 1.0 )
    SetError( errDivisionByZero );
PushDouble( sqrt( nVal / (nValCount - 1.0)));


For ScStDevP() it should be

if( nValCount == 0.0 )
    SetError( errDivisionByZero );
PushDouble( sqrt( nVal / nValCount));

because the error-NaN may not properly propagate through the sqrt() function.

Note that there is no 'else' path in these cases because SetError() doesn't push
a value; with a (here unnecessary) else path it should be

if( nValCount == 0.0 )
{
    SetError( errDivisionByZero );
    PushInt(0);
}
else
    PushDouble( sqrt( nVal / nValCount));

[we might as well enhance the PushError() function to take an argument for the
error value and use PushError( errDivisionByZero) instead of a SetError/PushInt
combination, that would clarify things for the reader]


---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to