以下のコードを実行するとどうなるでしょうか?
package main
import (
"fmt"
"math"
)
func main() {
fmt.Println(math.Pow(math.NaN(), 0))
}
-
0が出力される -
1が出力される -
NaNが出力される - panic になる
Go to list of users who liked
Share on X(Twitter)
Share on Facebook
More than 3 years have passed since last update.
以下のコードを実行するとどうなるでしょうか?
package main
import (
"fmt"
"math"
)
func main() {
fmt.Println(math.Pow(math.NaN(), 0))
}
0 が出力される1 が出力されるNaN が出力されるRegister as a new user and use Qiita more conveniently
Go to list of users who liked