Created
June 6, 2025 05:55
-
-
Save wchargin/35f11316852033dd770a4c06357880f0 to your computer and use it in GitHub Desktop.
consts and transitivity in go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"math" | |
) | |
func main() { | |
f := math.SmallestNonzeroFloat64 | |
fmt.Println(f == 5e-324) | |
fmt.Println(f == math.SmallestNonzeroFloat64) | |
fmt.Println(math.SmallestNonzeroFloat64 == 5e-324) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment