Re: [問題] 關於fixed point以及float point

看板C_and_CPP (C/C++)作者 (我愛ASM)時間16年前 (2009/05/14 01:38), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
※ 引述《LonGen (Longen)》之銘言: : 大家好 有兩個問題 : 今天看一本書上寫到 : 第一個是"如果乘上2的n次方倍數,相當於將浮點數往左位移n個位元" : 這是為什麼呢 浮點表示是用IEEE754表示法,位元移位會錯的。請參閱 http://squall.cs.ntou.edu.tw/cprog/Materials/FractionalNumber.html : 另外一個問題 : 書上的標題是"Replacing floating point values with fixed-point" : 裡面提到為了方便硬體運算 將floating point的數值轉成integer或long integer : 後面提到一個例子 : "which is expressed by 16 bits needs two bits as the integer width, : so the number of shifting bits is 13" 這是講定點運算(fixed-point) 同樣請參閱上面的Link.... : 有版友懂這段話的意思嘛?? 請教一下 非常感謝^^ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ※ 編輯: MasterChang 來自: 140.132.20.82 (05/14 01:39)
文章代碼(AID): #1A2mLzb2 (C_and_CPP)
文章代碼(AID): #1A2mLzb2 (C_and_CPP)