Numerical Analysis Questions & Answers  
Question by Student 201427143
Professor, Sorry but I'm wondering about the assignment 5.
The range upper limit is $10^{32}$, and the range lower limit is $3*10^{-65}$.
So, I thought 2 equations.

1) $(-1)^s*2^{P_{max}}*1.f_{max}=10^{32}$

2) $(-1)^s*2^{P_{min}}*1.f_{min}=3*10^{-65}$

Then, I got 2 size of bits 8 from eq1, and 9 from eq2.
And I thought the minimum number of bits is 9.
As at 5-(b) I put the 9 in equation $(-1)^s*2^{P_{min}}*0.f_{min}=3*10^{-65}$, I got the negative number of bits on significant.
What is the problem with that?
09.18.17
I'm not sure why you're getting negative bits.. You have more or less the right logic thus (although not perfectly). Keep working more on it.
Question by Student 201529190
Dear Professor, in IEEE single precision format p=e-127. I know 127 come from (2^8-2)/2 (just like in the middle). In Assignment#1 Question#5, we are asked to minimize the number of the bits. When I caculate p=e-something, it is necessery for "something" need to be the number that in the middle? Just like 127 in single precision format? Or I can define this "something" whatever I want? (If it can change, maybe I can find a smaller number of the bits.) And I wonder if we need to consider the subnormal numbers in this question. In this question, if the "something" have to in the middle and we need not consider subnormal numbers. Then we just need to find a range (a,b), which: a<3*10^-65,10^32<b. Then the number of bits needed to store the exponent is 9. And maybe the number of bits needed to store the significand is zero. Zero is weird. In question it does not mention machine precision. Thus I think it can be zero. If I make mistake or miss something please forgive me. Please do not limit my message permissions.(I saw someone was limited in last year message.) Thank you very much.
09.19.17
I will answer your question if the numbers are properly typeset. Answer it again below and use to write the math and numbers properly.
Question by Student 201529190
Dear Professor, in IEEE single precision format p=e-127. I know 127 come from $(2^8-2)/2$ (just like in the middle). In Assignment#1 Question#5, we are asked to minimize the number of the bits. When I caculate p=e-something, it is necessery for "something" need to be the number that in the middle? Just like 127 in single precision format? Or I can define this "something" whatever I want? (If it can change, maybe I can find a smaller number of the bits.) And I wonder if we need to consider the subnormal numbers in this question. In this question, if the "something" have to in the middle and we need not consider subnormal numbers. Then we just need to find a range (a,b), which: $a<3*10^{-65},10^{32}<b$. Then the number of bits needed to store the exponent is 9. And maybe the number of bits needed to store the significand is zero. Zero is weird. In question it does not mention machine precision. Thus I think it can be zero. If I make mistake or miss something please forgive me. Please do not limit my message permissions.(I saw someone was limited in last year message.) Thank you very much.
The number has to be constructed with the same rules as the float and double types shown in class. So yes, the exponents must be split equally between positive and negative values, and yes, the exponent must include the usual exceptions. Thus, denormal numbers will of course be present.
Question by Student 201427116
Professor, I have a question about Machine epsilon. We have used machine epsilon because of some possible errors on C language. In our class, for example, we calculated like this. $$g*g = (g\pm g*\epsilon_{mach})(g\pm g*\epsilon_{mach}) $$ But in our textbook('Introduction to Numerical Methods', Jeffrey R.Chasnov) the author says like this: "A rough estimate would be $5(1+\epsilon_{mach})=5+5\epsilon_{mach}$, but this is not exact. The exact answer can be found by writing $$ 5 = 2^2(1+\frac{1}{4})$$ so that the next largest number is $$2^2(1+\frac{1}{4}+2^{-23}) = 5 + 2^{-21} = 5+4\epsilon_{mach}."$$ I can't understand why this differece is made between 5 and $2^2(1+\frac{1}{4}).$ And also I'm wondering how can I express certain numbers to get rid of more errors as the author have done in our textbook.
09.23.17
Yes, the relative error can be less than $\epsilon_{\rm mach}$. In class, $\epsilon_{\rm mach}$ was defined as the maximum relative error on a non-denormal float. For most non-denormal floats, the error will of course be less. 1 point bonus boost.
09.24.17
Question by Student 201542124
Professor, I have a question about the assignment #2 question 1(a). At first, I started the bisection method about f=sin(x) with the interval [3,4]. And then, I tried it with [3.1, 3.2] again. As a result, the number of interactions in each case was different. Therefore, I think there is a possibility that we have different answers according to the intervals. Are there rules to decide the intervals?
10.05.17
Yes, of course, the number of iterations will depend on the initial interval chosen. This is why the initial interval is specified in the question. There are no rules that can be used to guess a proper initial interval that would apply in the general case because each function has a different behaviour. But if you do know the function, then it may be possible to specify an initial interval that is quite close to the root through a good guess for the root. 1 point bonus boost.
Question by Student 201427122
Professor, When I solved Question #1 (a), I appointed $$X_{min}=π/2$$ $$X_{max}=3π/2$$ Then I used the bisection method. Consequently The answer is $X_{13}$=3.1412... So $X_{13}$ is 3.141 for least 4 significant digits. Continuously, $$X_{14}=3.14140,X_{15}=3.14149, X_{16}=3.1415$$ Then I think $X_{16}$=3.142 for least 4 significant digits is answer. Because π is 3.142 for least 4 significant digits. I don't understand Why Your answer is 13. Did I equate wrong equation in this Question?
10.06.17
Here's a hint. Simply obtaining the 4th digit is not enough. You need to make sure the 4th significant digit is actually valid.. The best way to solve this problem is to specify what is the maximum allowable value of the relative error $\epsilon$ needed here and to determine analytically how many iterations is needed to reach this level. In the exam, I may ask you a similar question but instead of 4 significant digits, I may ask you for 100 significant digits. Solving the problem by hand one iteration at a time will take too long. Thus, you should aim to find here an analytical expression giving you number of iterations for a certain $\epsilon$ sought. 1 point bonus.
Previous   1  ...  5 ,  6 ,  7  ...  19    Next  •  PDF 1✕1 2✕1 2✕2  •  New Question
$\pi$