sc/source/core/tool/interpr3.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit 76198c537fa7595b94b2f930081bf7f6ec966dbe Author: Winfried Donkers <winfrieddonk...@libreoffice.org> Date: Fri Feb 17 17:16:13 2017 +0100 tdf#106049 Apply proper constraints for Calc function T.INV. Probability p must be 0 < p < 1 for inverse cumulative left-tailed t-distribution function. Change-Id: I4f79eac8c9362e31de46b3ff4ebe7283ec475fac Reviewed-on: https://gerrit.libreoffice.org/34375 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Eike Rathke <er...@redhat.com> diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx index 47625c5..b780e78 100644 --- a/sc/source/core/tool/interpr3.cxx +++ b/sc/source/core/tool/interpr3.cxx @@ -2268,7 +2268,9 @@ void ScInterpreter::ScTInv( int nType ) } if ( nType == 4 ) // left-tailed cumulative t-distribution { - if ( fP < 0.5 ) + if ( fP == 1.0 ) + PushIllegalArgument(); + else if ( fP < 0.5 ) PushDouble( -GetTInv( 1 - fP, fDF, nType ) ); else PushDouble( GetTInv( fP, fDF, nType ) ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits