Skip to content

Instantly share code, notes, and snippets.

@nikolaydubina
Last active December 15, 2022 01:43
Show Gist options
  • Save nikolaydubina/594f2d39ff5cc4457c89e7654235bbcc to your computer and use it in GitHub Desktop.
Save nikolaydubina/594f2d39ff5cc4457c89e7654235bbcc to your computer and use it in GitHub Desktop.

144.96

package main

import "fmt"

func main() {
	var x float32 = 144.96
	var y float64 = 144.96
	fmt.Printf("%#v %#v", float64(x) > y, x > float32(y))
  	// Output: true false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment