package main
func main() {
var i = 128 // int
m, n := byte(i), int8(i)
println(m, -m, m == -m) // 128 128 true
println(n, -n, n == -n) // -128 -128 true
}
Showing posts with label golang_bitwise_op. Show all posts
Showing posts with label golang_bitwise_op. Show all posts
Nov 11, 2019
[Go] bit trick
Sep 1, 2019
[Go] some v1.13 notes
Reference:
https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/golang-nuts/YwNZG7VQxaU/TurKBLt6AQAJ
v1.13 release note:
https://tip.golang.org/doc/go1.13
errors.As errors.Is errors.Unwrap implemented
https://tip.golang.org/doc/go1.13#errors
mentioned in Go2:
http://vsdmars.blogspot.com/2018/10/golang-go2.html
The execution time of Add, Sub, Mul, RotateLeft, and ReverseBytes is now guaranteed to be independent of the inputs.
https://tip.golang.org/doc/go1.13#math/bits
https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/golang-nuts/YwNZG7VQxaU/TurKBLt6AQAJ
v1.13 release note:
https://tip.golang.org/doc/go1.13
errors.As errors.Is errors.Unwrap implemented
https://tip.golang.org/doc/go1.13#errors
mentioned in Go2:
http://vsdmars.blogspot.com/2018/10/golang-go2.html
The execution time of Add, Sub, Mul, RotateLeft, and ReverseBytes is now guaranteed to be independent of the inputs.
https://tip.golang.org/doc/go1.13#math/bits
Subscribe to:
Posts (Atom)