Error question

  • Thread starter nhrock3
  • Start date
  • #1
nhrock3
415
0
2qtissi.jpg

why we do tailor around 1 and not 0
?
 
Last edited:

Answers and Replies

  • #2
tiny-tim
Science Advisor
Homework Helper
25,838
255
Hi nhrock3! :smile:

You can "Taylor" around any value where the function is sufficiently continuous and differentiable.

But it isn't at z = 0, so you can't "Taylor" there!

(and I expect they've chosen z = 1 because it's easiest to calculate the derivatives there! :wink:)
 
  • #3
nhrock3
415
0
so when x=y we have a problem
how transforming it into a taylor series solves this accuracy problem?
 
  • #4
36,332
8,293
Why do you think there is a problem when x = y? If x = y, log(x/y) = log(1) = 0.
 
  • #5
nhrock3
415
0
the question states how to get over loss of significance problem in here
f=ln x -ln y
x,y>0
and the solution says that we have a problem when x and y are close to each other
how transforming it into a taylor series solves this accuracy problem?
 
  • #6
36,332
8,293
I think that the idea here is that if x is close to y, then x/y is close to 1. You could have a situation where the actual value of x/y was 1.000000000001253, but because of limitations in computing precision, you might lose the part after the zeros.

By using a Taylor series to approximate log(x) - log(y) = log(z) [itex]\approx[/itex] z - 1, the part after the zeros above is now significant.
 
  • #7
nhrock3
415
0
so what if " x/y is close to 1"
"limitations in computing precision"
how does this limitation get solves by this method?
 
  • #8
36,332
8,293
Try it with a calculator. Enter .00000000000125, and then add 1. Many calculators will display an answer of 1 since they aren't able to maintain enough digits of precision to display the actual answer.

So if you have two numbers that are very different in relative size, (e.g. 1 vs. .00000000000125), adding them causes the loss of digits. If you can strip off the 1, though, there's no problem in storing or computing with the part to the right of all the zeros. In computers, floating point numbers are stored in a way that is similar to scientific notation. Instead of being stored as .00000000000125, it would be stored something like 1.25 X 10-12. Not exactly like that, since the base is 2, not 10, and there are some other differences.

number like 1.00000000000125, where one part is very large
 
  • #9
nhrock3
415
0
the question states how to get over loss of significance problem in here
f=ln x -ln y?

f=ln x -ln y=ln z
the tailor series for ln z is:
[tex] \sum_{k=1}^{\infty}\frac{(-1)^{k+1}(Z-1)}{k}[/tex]
but how this expression equals z-1 ?
 
  • #10
36,332
8,293
The summation doesn't "equal" z - 1. It's "approximately equal" to z - 1. What they have done is discard all terms of degree 2 or larger in the series.
 

Suggested for: Error question

Replies
4
Views
600
  • Last Post
Replies
4
Views
485
Replies
10
Views
326
  • Last Post
Replies
3
Views
831
Replies
6
Views
977
Replies
1
Views
367
Replies
3
Views
1K
Replies
4
Views
373
Replies
3
Views
482
Top