[運算] epsilon已回收

看板MATLAB作者 (handsomepow)時間14年前 (2011/10/11 20:37), 編輯推噓0(004)
留言4則, 1人參與, 最新討論串1/1
Try to find out the largest positive computer number epsilon_1 and the smallest positive computer number epsilon_2 such that 1+epsilon_1 ≦ 1 and epsilon_2 ≦ 0 eps = 1; while (1+eps)>1 eps = eps/2; end eps = eps*2 eps = 2.2204e-016 我想請問我在Matlab跑出來的eps是最小的的正數 那題目eps最大的正數又是什麼 請指點一下 感謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 122.117.243.84

10/15 14:10, , 1F
最大正數小於1,最小正數小於0...題目有問題啦
10/15 14:10, 1F

10/15 14:11, , 2F
其實這個問題主要是在考MATLAB一個數用64位元表示,
10/15 14:11, 2F

10/15 14:13, , 3F
一部份是表示指數,一部份表示精確值...因兩者有限,所以表達
10/15 14:13, 3F

10/15 14:13, , 4F
的精度和最大數都是受限的....你要查一下其數的64位元格式
10/15 14:13, 4F
文章代碼(AID): #1Eb3XzuU (MATLAB)