decimal icon indicating copy to clipboard operation
decimal copied to clipboard

output 0

Open prettyCoders opened this issue 3 years ago • 1 comments

v1, _ := decimal.NewFromString("1") v2, _ := decimal.NewFromString("1000000000000000000") fmt.Println(v1.Div(v2))

prettyCoders avatar Jul 12 '22 10:07 prettyCoders

The API isn't clear here.

Div uses DivRound underneath, so you can pass in 18 as precision to get your desired result.

th3m477 avatar Jul 30 '22 16:07 th3m477