You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ah...@apache.org on 2020/06/29 14:12:52 UTC

[commons-statistics] 01/02: Fix SonarCloud: cast to double.

This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-statistics.git

commit fbf1ed532cc65ddbd84126c77bfb64da3f8706eb
Author: aherbert <ah...@apache.org>
AuthorDate: Mon Jun 29 14:23:03 2020 +0100

    Fix SonarCloud: cast to double.
---
 .../commons/statistics/distribution/SaddlePointExpansionUtils.java      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/commons-statistics-distribution/src/main/java/org/apache/commons/statistics/distribution/SaddlePointExpansionUtils.java b/commons-statistics-distribution/src/main/java/org/apache/commons/statistics/distribution/SaddlePointExpansionUtils.java
index 73588a2..c623078 100644
--- a/commons-statistics-distribution/src/main/java/org/apache/commons/statistics/distribution/SaddlePointExpansionUtils.java
+++ b/commons-statistics-distribution/src/main/java/org/apache/commons/statistics/distribution/SaddlePointExpansionUtils.java
@@ -94,7 +94,7 @@ final class SaddlePointExpansionUtils {
         if (z <= STIRLING_ERROR_THRESHOLD) {
             ret = EXACT_STIRLING_ERRORS[2 * z];
         } else {
-            final double z2 = z * z;
+            final double z2 = (double) z * z;
             ret = (0.083333333333333333333 -
                     (0.00277777777777777777778 -
                             (0.00079365079365079365079365 -