decimal icon indicating copy to clipboard operation
decimal copied to clipboard

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

Open gummy789j opened this issue 1 year ago • 1 comments

截圖 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"

gummy789j avatar Jan 30 '24 14:01 gummy789j

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.

mwoss avatar Jan 30 '24 22:01 mwoss