Description
BigDecimal Parse(Double input) => Parse(input.ToString(CultureInfo.CurrentCulture)); uses CurrentCulture to convert double into string, while next step uses BigDecimalNumberFormatInfo, which is InvariantCulture: public static BigDecimal Parse(String input) { return Parse(input, BigDecimalNumberFormatInfo); }
So, If CurrentCulture's NumberFormat is not similar to InvarantCulture, Parse + all releated tests will fail.
Example: new CultureInfo("ru-RU") has 'comma' for decimal point.
Description BigDecimal Parse(Double input) => Parse(input.ToString(CultureInfo.CurrentCulture)); uses CurrentCulture to convert double into string, while next step uses BigDecimalNumberFormatInfo, which is InvariantCulture: public static BigDecimal Parse(String input) { return Parse(input, BigDecimalNumberFormatInfo); }
So, If CurrentCulture's NumberFormat is not similar to InvarantCulture, Parse + all releated tests will fail. Example: new CultureInfo("ru-RU") has 'comma' for decimal point.
Same issue as BigDecimal/issues/16 reported by Degot. This issue exists in both these libraries.