Skip to Main Content
Itanium® Architecture for Programmers: Understanding 64-Bit Processors and EPIC Principles
book

Itanium® Architecture for Programmers: Understanding 64-Bit Processors and EPIC Principles

by James S. Evans - Lawrence University, Gregory L. Trimper - viika
April 2003
Intermediate to advanced content levelIntermediate to advanced
576 pages
15h 13m
English
Pearson
Content preview from Itanium® Architecture for Programmers: Understanding 64-Bit Processors and EPIC Principles

8.9. APPROXPI: Using Floating-Point Instructions

The transcendental number π can be computed using many techniques. One method, which we do not hold up as the best, has its basis in the recognition that the area of a circle of radius a is πa2 while the area of a square just large enough to enclose the circle is 4a2 (see Figure 8-3). The ratio of the area of the circle to the area of the square is πa2/4a2 or π/4. If we could separately measure the areas of the circle and the square, we could estimate π to be 4 times the ratio of the area of the circle to the area of the square.

Figure 8-3. Circle and enclosing square for estimating π

Consider a ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

ARM System Developer's Guide

ARM System Developer's Guide

Andrew Sloss, Dominic Symes, Chris Wright
Intel Xeon Phi Processor High Performance Programming, 2nd Edition

Intel Xeon Phi Processor High Performance Programming, 2nd Edition

James Jeffers, James Reinders, Avinash Sodani

Publisher Resources

ISBN: 0131013726Purchase book