[討論] x*(1/x)!=1已回收

看板MATLAB作者 (0n洋)時間15年前 (2010/12/02 00:47), 編輯推噓0(002)
留言2則, 2人參與, 最新討論串1/1
我想請問各位大大能不能幫我解題: (a) Find any floating‐point number x in the range 1< x < 2 such that x*(1/x) ≠1; that is, fl(x fl(1/x)) is not exactly 1. (b) To find out the smallest such number. 我希望能夠用matlab或是其他軟體求出答案 可是我一直不知道該如何下手 然後我寫出來的程式也無法幫我解答 懇請各位大大幫幫我 format long temp=input('Please input a number between 1 and 2:'); temp=temp-1; m=1; i=1; while (m==1 && i<100) temp=temp/2 m=(1/(temp+1)) m=m*(temp+1) i=i+1; end 謝謝~ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.113.69.95

12/02 01:32, , 1F
不同軟體的精確度不會一樣吧
12/02 01:32, 1F

12/02 08:44, , 2F
那要怎麼找出來呢?
12/02 08:44, 2F
文章代碼(AID): #1Czdm5p2 (MATLAB)