Author Topic: Taking square roots by hand  (Read 4060 times)

0 Members and 1 Guest are viewing this topic.

Offline squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Taking square roots by hand
« on: February 06, 2011, 08:09:01 pm »
Why would you need this??? We have calculators! ;)

Anyway, thought some of you guys would appreciate this ;)

edit: holy, massive picture x.x
« Last Edit: February 06, 2011, 08:11:00 pm by squidgetx »

Offline Binder News

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 785
  • Rating: +46/-3
  • Zombie of Tomorrow
    • View Profile
Re: Taking square roots by hand
« Reply #1 on: February 06, 2011, 08:16:00 pm »
LOL. I love it. Might just show it to my math teacher.
Spoiler For userbars:







Hacker-in-training!   Z80 Assembly Programmer     Axe Programmer
C++ H4X0R             Java Coder                           I <3 Python!

Perdidisti ludum     Cerebrum non habes

"We are humans first, no matter what."
"Fame is a vapor, popularity an accident, and riches take wings. Only one thing endures, and that is character."
Spoiler For Test Results:





Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Taking square roots by hand
« Reply #2 on: February 06, 2011, 08:41:50 pm »
Ah yes, this is a very nice method. I've been doing this since 7th grade :D I happened to have a trig book from the 50's, no electronics, and a whole summer vacation of having fun with math.

In binary:

Let:
A=Result
B=Remainder

Initial:
d=0
b=01 01.00 00
a=0

Cycle 1
;shift upper two bits in b to D
  b=01 00 00 00
  d=00 00 00 01
2*A
 ;A=00 00 00 00
A→C
 ;C=00 00 00 00
2*C+1
 :C=00 00 00 01
cp C,D
 if C is less than or equal to D
  D-C→D
  ; D= 00 00 00 00
  A+1→A
  ;A=00 00 00 01
Repeat
;shift upper two bits in b to D
  b=00 00 00 00
  d=00 00 00 01
2*A
 ;A=00 00 00 10
A→C
 ;C=00 00 00 10
2*C+1
 :C=00 00 00 11
cp C,D                              ;C is greater than D
x if C is less than or equal to D   ;False
x  D-C→D                            ;Not Executed
x  ; D= xx                           ;""
x  A+1→A                            ;""
x  ;A=xx                            ;""
Repeat

The first two bits calculated in this case is the integer part and after that all the bits are the fractional part (in binary).

EDIT: Those ;D are supposed to be ; D. grrr...

Offline Juju

  • Incredibly sexy mare
  • Coder Of Tomorrow
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 5730
  • Rating: +500/-19
  • Weird programmer
    • View Profile
    • juju2143's shed
Re: Taking square roots by hand
« Reply #3 on: February 06, 2011, 09:40:06 pm »
Nice, I always wondered how to make square roots by hand. Thanks :D

Remember the day the walrus started to fly...

I finally cleared my sig after 4 years you're happy now?
THEGAME
This signature is ridiculously large you've been warned.

The cute mare that used to be in my avatar is Yuki Kagayaki, you can follow her on Facebook and Tumblr.

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: Taking square roots by hand
« Reply #4 on: February 07, 2011, 07:31:35 am »
The square root one is a specific example of the Shifting nth root algorithm
You can also find any higher roots, and in any base! ;D
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.