liveBook · Manning

Heron approximation

Heron approximation is an iterative numerical method that refines an estimate of a square root or related reciprocal quantity.

How 2 Manning books explain it

Modern C

The Heron approximation is an iterative numerical method for computing the multiplicative inverse of a number.

How it is used
Demonstrates while and do iteration through a practical floating-point inverse calculation.
How deep it goes
Explains the update and stopping test with code, but defers the numerical derivation.
Examples
Uses a = 34.0, x = 0.5, an epsilon threshold, and complete C listings with sample inverse results.
What you can do after
Apply it via C loop constructs to compute approximate multiplicative inverses with a chosen precision threshold.

Read how Modern C explains Heron approximation →

Modern C, Third Edition

The Heron approximation is an iterative numerical method for refining an estimate of a reciprocal or square-root-related quantity.

How it is used
Uses reciprocal approximation to demonstrate while, do, break, and continue iteration in C.
How deep it goes
Explains the update and convergence test, then shows scaling, bounded refinement, and alternate loop forms.
Examples
Uses a = 34.0, initial x = 0.5, a complete inverse program, and outputs for 0.07, 5, and 6E+23.
What you can do after
Apply it via C while, do, or break-based loops to compute multiplicative inverses to a chosen tolerance.

Read how Modern C, Third Edition explains Heron approximation →

What to know first

Related concepts

Questions about Heron approximation

What is Heron approximation?

Heron approximation is an iterative numerical method that refines an estimate of a square root or related reciprocal quantity.

Which Manning books explain Heron approximation?

Modern C and Modern C, Third Edition.

What should I know before learning Heron approximation?

Manning books that teach Heron approximation usually introduce scope and size_t first.

What is the difference between Heron approximation and heron process?

Heron approximation is an iterative numerical method that refines an estimate of a square root or related reciprocal quantity. The Heron process is an iterative numerical method for approximating roots of a number.

What is Heron approximation a kind of?

Heron approximation is a kind of approximation. Approximation is representing or computing a result that is sufficiently close to an exact result for an intended purpose, without requiring exact equality.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.