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

RoundFloor & RoundCeil example on pkg.go.dev seems Wrong #347

Open
gummy789j opened this issue Jan 30, 2024 · 1 comment
Open

RoundFloor & RoundCeil example on pkg.go.dev seems Wrong #347

gummy789j opened this issue Jan 30, 2024 · 1 comment

Comments

@gummy789j
Copy link

gummy789j commented Jan 30, 2024

截圖 2024-01-30 晚上10 41 07

截圖 2024-01-30 晚上10 44 53

decimal.NewFromFloat(-1.454).RoundFloor(1).String() -> output would be "-1.5"

decimal.NewFromFloat(-1.454).RoundCeil(1).String() -> output would be "-1.4"

@mwoss
Copy link
Member

mwoss commented Jan 30, 2024

Hi! This issue has been already fixed on the main branch. I have to create a new release so documentation will be updated on pkg;.go.dev.
I will do it soon, as I'm finishing a Pow implementation that I want to include in the 1.4.0 release.

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