Free 186 More Best Homemade Tools eBook:  
New: 300+ fresh build posts/day from 275 forums → BuildThreads.com

User Tag List

Results 1 to 10 of 44

Thread: Extending the range of calipers

Threaded View

  1. #18
    Supporting Member mklotz's Avatar
    Join Date
    Aug 2015
    Location
    LA, CA, USA
    Posts
    3,720
    Thanks
    376
    Thanked 7,190 Times in 2,348 Posts

    mklotz's Tools
    Quote Originally Posted by WmRMeyers View Post
    Everything you need to do with arithmetic can be done with a mechanical adding machine. It's just slow, and error-prone.
    Ever tried extracting a square root with a mechanical, four function (no square root key) calculator? :-)

    In grade school they taught us an alogorithm that was as complex as it was impossible to remember; I made a point of forgetting it as soon as the class was over.

    The easiest way is to use Heron's iterative algorithm. Say 'N' is the number whose root is to be found. Make a guess of the root, 'x'. Then if x is smaller than the true root, N/x will be larger; If x is larger than N/x is smaller. Thus a better estimate is the average of these two...

    z = (x + N/x) / 2

    Now, keep iterating. Use z in place of x and compute a new value of z. As these iterations proceed, z will converge to the true value of the root.

    A good initial guess for x is the largest integer whose square is less than N. The better the guess, the faster the convergence.

    In the example below, I deliberately chose a poor initial guess; six would have been better. Despite this poor guess, I've got a damn accurate value in only three iterations.

    N = 49
    x = 5

    z = (5 + 49/5) / 2 = 7.4

    z = (7.4 + 49/7.4) / 2 = 7.0108...

    z = (7.0108 +49/7.0108) / 2 = 7.00000833525

    Close enough for government work.

    Choosing a first guess larger than the correct value doesn't matter...

    N = 49
    x = 9

    z = (9 + 49/9) / 2 = 7.222...

    z = (7.222 + 49/7.222) / 2 = 7.0034

    etc.
    Last edited by mklotz; Jun 12, 2021 at 12:59 PM.
    ---
    Regards, Marv

    Smart phones are to people what laser pointers are to cats
    Homo sapiens is a goal, not a definition

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •