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

fmt.Print float64 out of range

package main

import (
	"fmt"
)

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

a

@randall77
Copy link
Contributor

I don't see a bug here.

@ALTree
Copy link
Member

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 as completed Oct 17, 2020
@golang golang locked and limited conversation to collaborators Oct 17, 2021
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

4 participants