ch1-basic/ch1-03-array-string-and-slice #622
Replies: 5 comments 4 replies
-
成功数 = copy(目标数据, 原数据) |
Beta Was this translation helpful? Give feedback.
-
SortFloat64FastV这种排序有问题,float64类型指数的起始数为011 1111 1111, -1.0内存里存的是1 011 1111 1111 0....,-2.0存的是1 100 0000 0000 0....,这就导致了排序后-2.0>-1.0 |
Beta Was this translation helpful? Give feedback.
-
func main() { func SortFloat64FastV2(a []float64) {
} output: [-1.1 -10 0 1 1.1 2 3 4] 确实有问题 |
Beta Was this translation helpful? Give feedback.
-
int 不是 32bit吗?为什么可以吧float64转换成int? |
Beta Was this translation helpful? Give feedback.
-
ch1-basic/ch1-03-array-string-and-slice
Go语言高级编程
https://chai2010.cn/advanced-go-programming-book/ch1-basic/ch1-03-array-string-and-slice.html
Beta Was this translation helpful? Give feedback.
All reactions