Skip to content

NewFromString loss precsion with zero trailing #181

@guotie

Description

@guotie

if I use NewFromString to convert a string like 100.000, the decimal i got precision is 0!

for example:

ss := "100.000"
d, _ := decimal.NewFromString(ss)
fmt.Println(-d.Exponent())  // here is 0, but should be 3!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions