We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
BigDecimal can't make up its mind whether to round or not when given a java.math.MathContext:
scala> BigDecimal(123456789, new java.math.MathContext(5)) res8: scala.math.BigDecimal = 123456789 scala> BigDecimal(123456789L, new java.math.MathContext(5)) res9: scala.math.BigDecimal = 1.2346E+8 scala> BigDecimal(123456789f, new java.math.MathContext(5)) res10: scala.math.BigDecimal = 1.2346E+8 scala> BigDecimal(123456789d, new java.math.MathContext(5)) res11: scala.math.BigDecimal = 1.2346E+8 scala> BigDecimal(new java.math.BigDecimal(123456789d), new java.math.MathContext(5)) res12: scala.math.BigDecimal = 123456789 scala> BigDecimal.valueOf(123456789d, new java.math.MathContext(5)) res13: scala.math.BigDecimal = 123456789
The text was updated successfully, but these errors were encountered:
Imported From: https://issues.scala-lang.org/browse/SI-8116?orig=1 Reporter: @Ichoran Affected Versions: 2.10.3, 2.11.0-M7
Sorry, something went wrong.
@adriaanm said: scala/scala#3316
@SethTisue said: see also scala/scala#4527
Ichoran
No branches or pull requests
BigDecimal can't make up its mind whether to round or not when given a java.math.MathContext:
The text was updated successfully, but these errors were encountered: