英文:
What are the best uses for Go Imaginary Literals?
问题
如果下面的代码返回true,对我来说也没问题。
既然它没有返回,那么这个特性有什么最佳用途?我错过了什么吗?
a := 10.52i
b := 10i
fmt.Println(a == b)
//false
英文:
It would be fine for me if the code below returned true.
Since it has not, what are the best uses for this feature? What am I missing?
a := 10.52i
b := 10i
fmt.Println(a == b)
//false
答案1
得分: 3
根据@Tashi、@Arkku和@axiac的评论,我意识到我缺乏数学知识来理解这个功能。
英文:
Based on @Tashi, @Arkku and @axiac's comments, I realized that I am missing Math knowledge to understand this feature.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论