Commit 2031dd45 authored by Dmitry.Shahtanov's avatar Dmitry.Shahtanov Committed by Alexander.Trofimov

fixed:

Bug 26030 - Не рассчитывается функция ERF/ERFC если аргументы являются отрицательными числами
Bug 26028 - Некорректная ошибка выводится когда аргументы/ссылки содержат ошибки/их значения

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@57850 954022d7-b5bf-4e40-9824-e11837661b57
parent 57ec2ea0
...@@ -1273,10 +1273,6 @@ cERF.prototype.Calculate = function ( arg ) { ...@@ -1273,10 +1273,6 @@ cERF.prototype.Calculate = function ( arg ) {
a = a.getValue(); a = a.getValue();
if ( a < 0 ) {
return this.value = new cError( cErrorType.not_numeric );
}
if ( !( b instanceof cUndefined ) ) { if ( !( b instanceof cUndefined ) ) {
b = b.tocNumber(); b = b.tocNumber();
if ( b instanceof cError ) { if ( b instanceof cError ) {
...@@ -1285,10 +1281,6 @@ cERF.prototype.Calculate = function ( arg ) { ...@@ -1285,10 +1281,6 @@ cERF.prototype.Calculate = function ( arg ) {
b = b.getValue(); b = b.getValue();
if ( b < 0 ) {
return this.value = new cError( cErrorType.not_numeric );
}
this.value = new cNumber( rtl_math_erf( b ) - rtl_math_erf( a ) ); this.value = new cNumber( rtl_math_erf( b ) - rtl_math_erf( a ) );
} }
...@@ -1323,17 +1315,12 @@ cERFC.prototype.Calculate = function ( arg ) { ...@@ -1323,17 +1315,12 @@ cERFC.prototype.Calculate = function ( arg ) {
a = a.tocNumber(); a = a.tocNumber();
if ( a instanceof cError ) { if ( a instanceof cError ) {
return this.value = new cError( cErrorType.wrong_value_type ); return this.value = a;
} }
a = a.getValue(); a = a.getValue();
if ( a < 0 ) {
this.value = new cError( cErrorType.not_numeric );
}
else {
this.value = new cNumber( rtl_math_erfc( a ) ); this.value = new cNumber( rtl_math_erfc( a ) );
}
return this.value; return this.value;
......
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