Skip to content

math/big: alternative format for Go syntax representation %#v of Int and Float #67216

@larhun

Description

@larhun

Go version

go1.21.6 windows/amd64

Output of go env in your module/workspace:

insignificant

What did you do?

Run the snippet https://go.dev/play/p/bxXUjdjkcxQ.

What did you see happen?

Printing a big.Int and a big.Float value with the %v and %#v formats yields the same "default value".

Printing a big.Rat value %v and %#v formats yields a "default value" and a "Go-syntax representation of the value" as mandated by the fmt package.

What did you expect to see?

Printing a big.Int and a big.Float value with the %#v format should yield a "Go-syntax representation of the value" as mandated by the fmt package.

Metadata

Metadata

Assignees

Labels

NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions