Skip to Content
Hacker’s Delight, Second Edition
book

Hacker’s Delight, Second Edition

by Henry S. Warren
September 2012
Intermediate to advanced
512 pages
12h 41m
English
Addison-Wesley Professional
Content preview from Hacker’s Delight, Second Edition

Chapter 11. Some Elementary Functions

11–1 Integer Square Root

By the “integer square root” function, we mean the function Image. To extend its range of application and to avoid deciding what to do with a negative argument, we assume x is unsigned. Thus, 0 ≤ x ≤ 232 – 1.

Newton’s Method

For floating-point numbers, the square root is almost universally computed by Newton’s method. This method begins by somehow obtaining a starting estimate g0 of Image. Then, a series of more accurate estimates is obtained from

The iteration converges quadratically—that is, ...

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

TCP/IP Illustrated, Volume 1: The Protocols, 2nd Edition

TCP/IP Illustrated, Volume 1: The Protocols, 2nd Edition

Kevin R. Fall, W. Richard Stevens
Understanding the Linux Kernel, 3rd Edition

Understanding the Linux Kernel, 3rd Edition

Daniel P. Bovet, Marco Cesati

Publisher Resources

ISBN: 9780133084993Purchase book