diff --git a/src/ConfigCatClient/Evaluation/RolloutEvaluator.cs b/src/ConfigCatClient/Evaluation/RolloutEvaluator.cs index d19290f3..bcaf5596 100644 --- a/src/ConfigCatClient/Evaluation/RolloutEvaluator.cs +++ b/src/ConfigCatClient/Evaluation/RolloutEvaluator.cs @@ -868,7 +868,10 @@ private static string UserAttributeValueToString(object attributeValue) } else if (attributeValue.TryConvertNumericToDouble(out var number)) { - return number.ToString(CultureInfo.InvariantCulture).Replace("E", "e"); + var format = Math.Abs(number) is > 1e-7 and < 1e21 + ? "0.#################" + : "0.#################e+0"; + return number.ToString(format, CultureInfo.InvariantCulture); } else if (attributeValue.TryConvertDateTimeToDateTimeOffset(out var dateTimeOffset)) {