Skip to content

Commit

Permalink
java's method Double.toString is able to convert not-a-number values …
Browse files Browse the repository at this point in the history
…to "NaN" string (#611)

Signed-off-by: Andrey Turbanov <[email protected]>
  • Loading branch information
turbanoff authored Jan 3, 2021
1 parent 6ed8bee commit 683466f
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public Sample(String name, List<String> labelNames, List<String> labelValues, do
}

public Sample(String name, List<String> labelNames, List<String> labelValues, double value) {
this(name, labelNames, labelValues, value, null);
this(name, labelNames, labelValues, value, null);
}

@Override
Expand Down Expand Up @@ -217,9 +217,6 @@ public static String doubleToGoString(double d) {
if (d == Double.NEGATIVE_INFINITY) {
return "-Inf";
}
if (Double.isNaN(d)) {
return "NaN";
}
return Double.toString(d);
}
}

0 comments on commit 683466f

Please sign in to comment.