Closed Degot closed 1 year ago
Wow. Good catch. This same bug also existed in my BigRational library, as they share many of the same design patterns.
So thank you for that.
I pushed a new version/build of this library that includes these changes to NuGet, version 2023.1000.3.328.
Thanks for your interest in my library and for your contributions.
Feel free to close this ticket if you are satisfied, otherwise Ill swing back around in a week or so and close it if I hear nothing further from you. .
Fixed. Thank you.
Hello,
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.