4.8.5 · HinglishNumerical Methods

Numerical stability vs instability — catastrophic cancellation

1,508 words7 min readRead in English

4.8.5 · Maths › Numerical Methods


KYA ho raha hai?


Subtraction digits kyun destroy karta hai? (Scratch se derivation)

Maano true values aur hain jahan . Computer hold karta hai

Ab difference banao. Error hai:

Toh absolute error hai , jo se bound hai — chhota, bilkul expected.

Dikkat relative error mein hai:

Bound karte hain:

Factor subtraction ka condition number hai. Jab ho toh yeh enormous hota hai — yahi catastrophe hai.


Figure — Numerical stability vs instability — catastrophic cancellation

Isse kaise pehchanein aur fix karein

Ilaaj almost hamesha algebra hai: expression ko aise rewrite karo ki khatarnak subtraction kabhi na ho.



Recall Feynman: ek 12-saal ke bachche ko samjhao

Socho do lambe block towers hain, ek 1000 blocks oonchi, doosri 1001. Tumne har ek ko sirf nearest block tak measure kiya — toh har ek aadhe block tak off ho sakti hai. Ab tum poochho "doosri kitni zyada oonchi hai?" Jawab hai lagbhag 1 block — lekin tumhari aadhe-block uncertainties ab us 1-block answer ke comparison mein BAHUT BADI hain! Tum towers ke baare mein confident ho lekin chhote se difference ke baare mein clueless. Trick yeh hai: dono towers measure karke subtract mat karo — ek aisa tarika dhundho jo gap directly measure kare.


Active Recall

Catastrophic cancellation kya hai?
Do nearly-equal rounded numbers subtract karne par relative accuracy ki badi loss; bachne wale significant digits bahut kam hote hain.
Kya cancellation absolute error badhata hai?
Nahi — absolute error rehta hai. Yeh relative error magnify karta hai kyunki tiny hai.
subtract karne ka condition number kya hai?
— huge jab ho.
Khoye hue digits ka rule of thumb?
Agar leading digits mein agree karte hain, toh lagbhag significant digits khota hai.
ka stable fix?
Conjugate se multiply karo: (difference ko sum mein badal deta hai).
Chhote quadratic root ka stable fix?
Addition se large-magnitude root compute karo, phir chhote ke liye Vieta use karke divide karo.
Chhote ke liye ka stable form?
, ya Taylor series .
Conditioning vs stability?
Conditioning = problem ki sensitivity; stability = algorithm ka error-amplification.
Kya higher precision cancellation cure karta hai?
Nahi, yeh sirf delay karta hai; algorithm ko reformulate karna asli ilaaj hai.
IEEE double ke liye unit roundoff ?
(~16 significant decimal digits).

Connections

Concept Map

stores as fl x = x 1+delta

hides in last digits

leading digits cancel

absolute error stays small

relative error blows up

quantified by

agree to k digits

is a mechanism of

contrast with

cured by algebra

e.g. conjugate rationalise

Finite precision floating-point

Rounding error bounded by u

Subtract nearly-equal numbers

Catastrophic cancellation

Absolute error ~ u times abs a + abs b

Huge relative error

Condition number abs a + abs b over abs a - b

Lose about k significant digits

Numerical instability

Stable: errors stay bounded

Rewrite to avoid subtraction

sqrt x+1 minus sqrt x becomes a sum