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

fmt: bug in %v of []complex64 #4525

Closed
gopherbot opened this issue Dec 11, 2012 · 2 comments
Closed

fmt: bug in %v of []complex64 #4525

gopherbot opened this issue Dec 11, 2012 · 2 comments
Milestone

Comments

@gopherbot
Copy link

by daviddengcn:

Before filing a bug, please check whether it has been fixed since the
latest release. Search the issue tracker and check that you're running the
latest version of Go:

Run "go version" and compare against
http://golang.org/doc/devel/release.html  If a newer version of Go exists,
install it and retry what you did to reproduce the problem.

Thanks.

What steps will reproduce the problem?
If possible, include a link to a program on play.golang.org.
1. http://play.golang.org/p/z1peehevmH

What is the expected output?
(1-1i) (2-2i) (3-3i)
[(1-1i) (2-2i) (3-3i)]
[(1-1i) (2-2i) (3-3i)]

What do you see instead?
When a complex64/128 number is placed in a slice, it's text form may or may not contains
the leading plus sign in its real part
(1-1i) (2-2i) (3-3i)
[(1-1i) (+2-2i) (+3-3i)]
[(1-1i) (+2-2i) (+3-3i)]

Which compiler are you using (5g, 6g, 8g, gccgo)?
play.golang.org or any

Which operating system are you using?
play.golang.org or any

Which version are you using?  (run 'go version')
play.golang.org or any

Please provide any additional information below.
I'd like to write a testcast depending on the formated texts, so a consistent conversion
is necessary.
@rsc
Copy link
Contributor

rsc commented Dec 11, 2012

Comment 1:

Labels changed: added priority-soon, removed priority-triage.

Owner changed to @rsc.

Status changed to Started.

@rsc
Copy link
Contributor

rsc commented Dec 11, 2012

Comment 2:

This issue was closed by revision 07cc058.

Status changed to Fixed.

@rsc rsc added this to the Go1.1 milestone Apr 14, 2015
@rsc rsc removed the go1.1 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
@rsc rsc removed their assignment Jun 22, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants