This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

关于小数到整数的转换,一个奇葩的问题

Expert 1795 points

如图片所示,512.0 * 64 = 32768.0,有谁能解释一下,最后怎么会得到32767的?我认为从常理说,应该是-1才对呀。

是我太年轻,还是TI的编译器确实比较特殊,随着代码越来越复杂,碰到的坑越来越多,比如,CLA中对0开方居然是无穷大,吓得我赶紧去翻高中教材,以为我自己记错了。又比如,1<<16 = 1,根据本论坛的朋友介绍,似乎这个规则也是TI编译器的特色。今天又碰到这个,感觉TI都不是按常规出牌的啊~