作者seanooxox (0n洋)
看板Statistics
标题[问题] x*(1/x)!=1
时间Thu Dec 2 00:44:15 2010
我想请问各位大大能不能帮我解题:
(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