Git Product home page Git Product logo

handsqrt's Introduction

handsqrt

Emulate the algorithm to take square roots by hand

$>  ./sqrt.py 1000. -l 6 -x foo
Final estimate = 31.6227766
The estimate**2 = 999.99999989350756 - off by 1.0649244E-7
ratio = 1.0649244E-10 ( 106 parts per trillion )
#----------------------------
       3 1. 6 2 2 7 7 6 6
      _____
     /1000.
       9
      --
61*1 < 100
        61
       ---
626*6 < 3900
        3756
        ----
6322*2 < 14400
         12644
         -----
63242*2 < 175600
          126484
          ------
632447*7 < 4911600
           4427129
           -------
6324547*7 < 48447100
            44271829
            --------
63245546*6 < 417527100
             379473276
             ---------
632455526*6 < 3805382400
              3794733156
              ----------
                10649244

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.