Thanks! Determine εmatch by finding smallest ε = 2^(-k)?
1 view (last 30 days)
Show older comments
I'm new to Matlab, and our teacher asks us to determine εmatch by finding the smallest ε = 2^(-k), k is natural number for which (1+ε)-1 is non-zero. Specify the reported values of (1+ε)-1 for several larger and smaller values of ε = 2^(-k).
Please give some hints. Thank you for your help. :)
btw, does ε mean "error" here?
0 Comments
Answers (1)
Roger Stafford
on 17 Sep 2014
Writing code to determine that should be rather easy. Use a while-loop to repeatedly test whether (1+2^(-k))-1 is non-zero as the integer k increases in size. (The parentheses here are important.) Have the while loop quit when this quantity comes out an exact zero. The previous k gives you your answer. Piece of cake!
0 Comments
See Also
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!