[討論] x*(1/x)!=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