Robofun 機器人論壇

 找回密碼
 申請會員
搜索
熱搜: 活動 交友 discuz

關於整數+小數

查看數: 2072 | 評論數: 1 | 收藏 0
關燈 | 提示:支持鍵盤翻頁<-左 右->
    組圖打開中,請稍候......
發佈時間: 2014-6-1 14:46

正文摘要:

請問為什麼 小數八位 答案是錯的

回復

mzw2008 發表於 2014-6-1 15:34:17
那是因為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位準確

小黑屋|手機版|Archiver|機器人論壇 from 2005.07

GMT+8, 2024-9-30 17:24 , Processed in 0.167620 second(s), 11 queries , Apc On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回復 返回頂部 返回列表