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.Print Float64 out of range #42041

Closed
klikpaspor opened this issue Oct 17, 2020 · 2 comments
Closed

fmt.Print Float64 out of range #42041

klikpaspor opened this issue Oct 17, 2020 · 2 comments

Comments

@klikpaspor
Copy link

@klikpaspor klikpaspor commented Oct 17, 2020

fmt.Print float64 out of range

package main

import (
	"fmt"
)

func main() {
	selisih := 2270667198.58155
	fmt.Print(selisih)
}

a

@randall77
Copy link
Contributor

@randall77 randall77 commented Oct 17, 2020

I don't see a bug here.

@ALTree
Copy link
Member

@ALTree ALTree commented Oct 17, 2020

I think OP is confused by the scientific notation.

@klikpaspor please see https://en.wikipedia.org/wiki/Scientific_notation#E_notation. The number that was printed is correct. Closing here.

@ALTree ALTree closed this Oct 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.