maths.free › Numerical Methods › Floating point and error

Floating point and error

Why 0.1 + 0.2 ≠ 0.3 on a computer, and how error propagates.

Computers store numbers in binary with ~16 significant digits; 0.1 is not representable exactly. Round-off accumulates, and subtracting nearly equal numbers destroys digits (cancellation). Picture it: 255 in binary is 11111111, and 0.1 in binary never terminates. Think it: a stable algorithm keeps error growth linear; conditioning is a property of the problem, stability of the method.

လုပ်ဆောင်ခဲ့သောဥပမာ · 0.1 + 0.2

Evaluate 0.1 + 0.2

0.1 + 0.2

ခြေလှမ်းတစ်လှမ်း

  1. 0.3 = \frac{3}{10}

    Add: 0.1 + 0.2 = 3/10.

  2. \frac{3}{10} = 0.3

    Simplify.

အဖြေကို ဖော်ပြပါ
0.3

အခုတော့သင် ပြဿနာတစ်ခု Pick, သို့မဟုတ် type သို့မဟုတ်သင့်ကိုယ်ပိုင်ဆွဲ. အားလုံးအဆင့်, ဓာတ်ပုံ, သင်မေးသောအခါအထိအဖြေကိုပုန်း.

သင်၏ကိုယ်ပိုင်အလုပ်လုပ်ကိုင်ထား

တစ်ဦးအခမဲ့အကောင့်ကိုအားလုံးသင်ခန်းစာအပေါ်မှတ်စုများ adds, သင်ပြီးဆုံးခဲ့သည်ဘာ၏မှတ်တမ်း, တစ်နေရာတည်းတွင်သင်၏ဖြေရှင်းပြဿနာများကို, နှင့်သင်ဤစာမျက်နှာအကြောင်းကိုမေးနိုင်ပါတယ်ဆရာ. သင်္ချာကိုယ်လူတိုင်းအတွက်ဖွင့်, သို့မဟုတ်မဟုတ်ခဲ့.

မှတ်ပုံတင် ဝင်ရောက်မှု

ဒီနေရာမှာ သုံးစွဲတဲ့ သင်္ကေတများ

ပြည့်စုံသောအဓိပ္ပါယ်ဖွင့်ဆိုချက်အတွက်မည်သည့်အက္ခရာကိုမဆိုနှိပ်ပါ၊ ဓာတ်ပုံနှင့်၎င်းတွင်စာလုံးတိုင်းကိုဆိုလိုသည်ကို။

ဘယ်လို: Floating point and error

  1. Add: 0.1 + 0.2 = 3/10.
  2. Simplify.

လူတွေမေးတဲ့မေးခွန်းတွေ

Why not just solve exactly?

Most equations have no closed-form solution at all, and many that do are unusable in practice. A numerical method delivers as many correct digits as you need, and a good one tells you how many that is.

Why can Newton's method fail?

If it starts where the tangent is nearly flat it shoots far away; near a repeated root it slows to a crawl; and with several roots it may land on the wrong one. A bracketing method like bisection is slower but cannot fail.

ပိုပြီး Numerical Methods