Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DecimalFormatter.Format("G", new Fraction(-10, -20, false), CultureInfo.InvariantCulture) returns "0.5000000000000001" #69

Closed
lipchev opened this issue May 26, 2024 · 0 comments · Fixed by #70

Comments

@lipchev
Copy link
Contributor

lipchev commented May 26, 2024

Here's the output from the debugger

  Name Value Type
new Fraction(-10, -20, false) {-10/-20} Fractions.Fraction
  ▶ A -10 System.Numerics.BigInteger
  ▶ B -20 System.Numerics.BigInteger
  State Unknown Fractions.FractionState
  ◢ StringFormats "0.51" Fractions.Fraction.FractionDebugView.StringFormatsView
  GeneralFormat "0.5000000000000001" string
  ShortFormat "0.51" string
  SimplifiedFraction "-10/-20" string
  ◢ ValueFormats 0.5 Fractions.Fraction.FractionDebugView.NumericFormatsView
  Decimal 0.50 decimal
  Double 0.5 double
  Integer 0 int
  Long 0 long
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant