[問題] x*(1/x)!=1

看板Statistics作者 (0n洋)時間15年前 (2010/12/02 00:44), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串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
文章代碼(AID): #1CzdjZTT (Statistics)