由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Computation版 - how to estimate 1-a/b with (a close to b) correct
相关主题
Fortran and C请教一个简单的计量问题~~
fortran还是matlab?中文考试试题题,不会做,求帮忙。
Should I use C or matlab?我到底付了多少钱?
求教一个正态分布积分问题onSale 根本没有那么多货 很快很多order就要cancel
what's Bonferroni correction of p-valueQCOM earning estimate
Classification, Parameter Estimation and ...zzIRS收了税不承认
one questions版上有人知道PLD做氧化物陶瓷薄膜怎么样嘛?
HP SB cancelled后又收到confirmation email车祸发生10天之后保险被cancel,保险还有效吗
相关话题的讨论汇总
话题: close话题: estimate话题: correct话题: equal话题: precision
进入Computation版参与讨论
1 (共1页)
s**i
发帖数: 381
1
Hi,
it is well known that we should try to avoid the subtration of two nearly equal
numbers due to the cancellation error.
Is there any smart way to rewrite 1-a/b when a and b are close?
Thanks.
r****y
发帖数: 1437
2

double precision a, b
double precision c
c = 1.0d0/b
1.0d0 - a * c

equal

【在 s**i 的大作中提到】
: Hi,
: it is well known that we should try to avoid the subtration of two nearly equal
: numbers due to the cancellation error.
: Is there any smart way to rewrite 1-a/b when a and b are close?
: Thanks.

i*******n
发帖数: 166
3
(b-a)/b

【在 s**i 的大作中提到】
: Hi,
: it is well known that we should try to avoid the subtration of two nearly equal
: numbers due to the cancellation error.
: Is there any smart way to rewrite 1-a/b when a and b are close?
: Thanks.

1 (共1页)
进入Computation版参与讨论
相关主题
车祸发生10天之后保险被cancel,保险还有效吗what's Bonferroni correction of p-value
上午的wiiClassification, Parameter Estimation and ...zz
dell的电视被问是否可以换productone questions
没有打印机还搞么?HP SB cancelled后又收到confirmation email
Fortran and C请教一个简单的计量问题~~
fortran还是matlab?中文考试试题题,不会做,求帮忙。
Should I use C or matlab?我到底付了多少钱?
求教一个正态分布积分问题onSale 根本没有那么多货 很快很多order就要cancel
相关话题的讨论汇总
话题: close话题: estimate话题: correct话题: equal话题: precision