weired value

48 visningar
Hoppa till det första olästa meddelandet

WALID BELRHALMIA

oläst,
28 juli 2016 19:01:392016-07-28
till golang-nuts
Hello everybody still learning Go i remark a weired think,

this command :  fmt.Println(int(math.Pow(float64(9200), float64(5))))

Return :   -9223372036854775808   i don't know why normally 9200⁵  is a  positive big value can some one explain me this please in details ? 

Matt Harden

oläst,
28 juli 2016 19:44:572016-07-28
till WALID BELRHALMIA, golang-nuts
The large value overflows the range of an int and so it "wraps around" to a negative number.

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Svara alla
Svara författaren
Vidarebefordra
0 nya meddelanden