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

இப்போது நீங்கள் ஒரு பிரச்சனையை தேர்ந்தெடு, அல்லது தங்களையே வரையவும். ஒவ்வொரு படியும், ஒரு படமாக, நீங்கள் கேட்கும் வரை பதில் மறைக்கப்படும்.

உங்களின் வேலையை தொடரவும்

இலவச கணக்கு ஒவ்வொரு பாடத்திலும் குறிப்புகளை சேர்க்கும், நீங்கள் முடித்ததை பதிவு செய்கிறது, உங்கள் தீர்த்த பிரச்சனைகள் ஒரு இடத்தில், மற்றும் ஒரு ஆசிரியரை நீங்கள் இந்த பக்கத்தை பற்றி கேட்கலாம். கணிதமே அனைவருக்கும் திறந்துள்ளது, நுழைந்தாலும் இல்லையென்றாலும்.

பதிவு செய் உள்நுழை

இங்கே பயன்படுத்தப்பட்ட குறியீடுகள்

முழுமையான வரையறை, ஒரு படத்தை, மற்றும் ஒவ்வொரு எழுத்தும் என்ன அர்த்தம் என்று எந்த சின்னத்தையும் அழுத்து.

எப்படி: 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