avatar
又一个菜鸟问题# Computation - 科学计算
d*g
1
suppose you are trying to solve f(x)=0 for the function
f(x)=sum(a(k)*pow(x,k)) k=0,1,2,...8
where a(8)=1.0 and abs(a(k))<=3.0 for k=0,...,7. if there is a root near x=2.9
and you evaluate this polynomial at x=2.9, about how big the the biggest term
in the polynomial? if computation is done with precision =1e-7, and you
compute a value for f(2.9) of 0.04, what is the most likely value for the
absolut round off error in evaluating f(2.9)?
a) 3.0E-9
b) 1.0E-7
c) 4.0E-3
d) 2.5E-1
avatar
h*o
2
b?

【在 d**********g 的大作中提到】
: suppose you are trying to solve f(x)=0 for the function
: f(x)=sum(a(k)*pow(x,k)) k=0,1,2,...8
: where a(8)=1.0 and abs(a(k))<=3.0 for k=0,...,7. if there is a root near x=2.9
: and you evaluate this polynomial at x=2.9, about how big the the biggest term
: in the polynomial? if computation is done with precision =1e-7, and you
: compute a value for f(2.9) of 0.04, what is the most likely value for the
: absolut round off error in evaluating f(2.9)?
: a) 3.0E-9
: b) 1.0E-7
: c) 4.0E-3

avatar
f*l
3
I would choose c.
reason: f(x) is almost like x^8 since x is around 3.
then let's assume the error behave also like in the function x^8.
the problem then change to estimate (x+1e-7)^8 - x^8.
it's estimated as: 8*x^7*1e-7 just like u take the linear approximation.
ok, now 8*3^7*1e-7 is at the magnitude of 1e-3. so choose c.

【在 d**********g 的大作中提到】
: suppose you are trying to solve f(x)=0 for the function
: f(x)=sum(a(k)*pow(x,k)) k=0,1,2,...8
: where a(8)=1.0 and abs(a(k))<=3.0 for k=0,...,7. if there is a root near x=2.9
: and you evaluate this polynomial at x=2.9, about how big the the biggest term
: in the polynomial? if computation is done with precision =1e-7, and you
: compute a value for f(2.9) of 0.04, what is the most likely value for the
: absolut round off error in evaluating f(2.9)?
: a) 3.0E-9
: b) 1.0E-7
: c) 4.0E-3

avatar
h*o
4
ah....这个computation precision是这个意思?
我还以为算pow(x, k)的精度是1e-7

【在 f**l 的大作中提到】
: I would choose c.
: reason: f(x) is almost like x^8 since x is around 3.
: then let's assume the error behave also like in the function x^8.
: the problem then change to estimate (x+1e-7)^8 - x^8.
: it's estimated as: 8*x^7*1e-7 just like u take the linear approximation.
: ok, now 8*3^7*1e-7 is at the magnitude of 1e-3. so choose c.

avatar
f*l
5
I guess the precision here means round off error for the data.
So the final error of the result = the sensitivity times the precision.
8*x^7 is the major part of the sensitivity. So...

【在 h***o 的大作中提到】
: ah....这个computation precision是这个意思?
: 我还以为算pow(x, k)的精度是1e-7

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。