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

When scale is negative, the result is sci #176

Open
leeson1995 opened this issue Feb 14, 2022 · 2 comments
Open

When scale is negative, the result is sci #176

leeson1995 opened this issue Feb 14, 2022 · 2 comments

Comments

@leeson1995
Copy link

leeson1995 commented Feb 14, 2022

image

  • why result is sci 3E+3 ,why not 3000
go version go1.17.5 darwin/arm64
GOARCH="arm64"
github.com/ericlagergren/decimal v0.0.0-20211103172832-aca2edc11f73
@leeson1995
Copy link
Author

@ericlagergren pls cc

@lotodore
Copy link
Contributor

@leeson1995 The value 3E+3 is correct and equals 3000. Use "f" format to print non-sci value:

b := decimal.New(3, -3)
fmt.Printf("%f\n", b)

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

No branches or pull requests

2 participants