0 Replies - 1294 Views - Last Post: 25 February 2013 - 04:55 PM Rate Topic: -----

#1 keepitsimple  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 25-February 13

Excel Binary GCD Finder

Posted 25 February 2013 - 04:55 PM

I just invented the "Excel Binary GCD Finder"
http://en.wikipedia....y_gcd_algorithm
A1 Number 1
B1 Number 2
C1 =((IF(GCD(2,A1)>1,1,0)+IF(GCD(B1,2)>1,2,0)))
D1 =IF(C1=3,1,0)
E1 =IF(A1=B1,A1*(2^D1),"NOT YET")

A2 =IF(IF(C1=3,A1/2),IF(C1=2,A1),IF(C1=1,(A1/2),ABS((A1-B1)/2)))
B2 =IF(IF(C1=3,B1/2),IF(C1=2,B1/2),IF(C1=1,(B1),MIN(A1,B1)))
C2 =((IF(GCD(2,A2)>1,1,0)+IF(GCD(B2,2)>1,2,0)))
D2 =IF(C2=3,D1+1,D1)
E2 =IF(A1=B1,A1*(2^D1),"NOT YET")
Highlight row 2, pull down
Answer (GCD of Num1 and Num2) will be in the E column

Is This A Good Question/Topic? 0
  • +

Page 1 of 1