Robofun 機器人論壇

標題: 關於整數+小數 [打印本頁]

作者: s5616013    時間: 2014-6-1 14:46
標題: 關於整數+小數

請問為什麼 小數八位 答案是錯的
作者: mzw2008    時間: 2014-6-1 15:34
那是因為float這個型別
http://arduino.cc/en/Reference/Float
They are stored as 32 bits (4 bytes) of information.
Floats have only 6-7 decimal digits of precision
四byte大小,實際約6-7位準確




歡迎光臨 Robofun 機器人論壇 (https://robofun.net/forum/) Powered by Discuz! X3.2