top of page
Writer's pictureDr. Harish Ravi

Square root proof and derivation of pi, e


Calculator can be designed with binary bits and transistors and ics for single digit operations. There's an IQ shortage and IQ leak for people who don't learn to design the calculator and Maclaurin series like those who did biology, art or finance. One can learn it by trying on qpython even on smartphones. See below. A calculator or ALU can perform single digit operations with 4 bit numbers atleast 64 bit or 4 byte double would be optimised with Kmaps for least number of transistors. for It would need instruction decoding , registers and can be programmed by interconnecting transistors in VHDL. Its very exciting to design in VHDL burn the code on a pre existing chip with transistors or on a photo resist and make your own calculator starting from silicon and doping it. Practical application comes when a child asks how far the horizon would be at a beach if earth was spherical. The parent then needs to take them that far and show that the you don't drop off the edge. Sqrt((6400+1)^2-6400^2)=113.1 km or 2 hours into the sea or road at 60 kmph which I have gone by air at 1000 kmph in 6 mins. Ignore the calculation mistake of 82 km below. The captain should announce it after take off and 6 mins. I have traveled more than 114 km on the sea, land and air when I was 1 m high in 1990-2000. I have also timed the reflection off space lunar mirror in tbbt to confirm Kepler's laws and gravity . For we can't prove disprove my theory that the earth fluctuates between a disc and a globe when we sleep or that time doesn't freeze in the night theory. I would encourage you to have fun with your friend on just observation s of stars or hills and trigonometry to prove that the earth seems to be round. Don't miss out.

This proof I couldn't find in any textbook as it was hard to raster and think about. On education, I think it would be great if we could make Lego robotics based computer game for designing the Lego arm for the right angular speed, etc. I also encourage people to try to make the Rubik's cube game as soon as they learn computer programming. In the olden day they made a mechanical calculator and then a room sized enigma for the square root. I have dissected and fixed mechanical calculators or speedometers in childhood and built electronic calculators in adulthood. Human IQ and memory has a leak and people don't develop if the square root proof should not be taught. I am going to build another calculator in my spare time and anybody would be welcome to see me build. See below the code in Python, you have to indent it properly for it to work or use the code in about page calculator.py on your smartphone or pc. Every operation in C or verilog would be so many operations. You can build a multiplier and added and aubtractor with digital circuits.

#The ALU has digital circuits for sum, subtraction, multiplication and comparision. #The challenge here would be to write the code for division, square root, trignometric and other fuctions #The following python code just needs python install of 30 MB

x='25'; #2 digit number y='14'; #2 digit number

#Doing representation of two digit product product=int(x[1])*int(y[1])+10*(int(x[0])*int(y[1])+int(x[1])*int(y[0]))+int(x[0])*int(y[0])*100

#Doing representation of digit sum and subtraction add=int(x[1])+int(y[1])+10*(int(x[0])+int(y[0])) sub=int(x[1])-int(y[1])+10*(int(x[0])-int(y[0]))

#Showing output, print('Product of ',x,' and' ,y,' ', product) print('Sum of',x,' and' ,y,' ',add) print('Subtraction ',x,' and' ,y,' ',sub)

#Dividing x a two digit number by z a single digit number z='3'# Single digit number ha=1;# While loop flag j=0; # Increasing the quotient in the loop until the product exceeds the divisor while ha: r=int(x[1])+10*int(x[0])-j*int(z[0]); if(r<int(z[0])): ha=0; #Setting the while loop flag to 0 to come out of the loop j=j+1; #incrementing the quotient until it divides j=j-1; # Reducing the quotient as we counted one past

#Getting the decimal point of the quotient ha=1; h=0; while ha: r2=r*10-h*int(z[0]); if(r2<int(z[0])): ha=0; h=h+1; h=h-1; print('division of ',x,' and' ,z,' ',j,'.',h)

#Finding square root by subtracting successively the contribution from most significant digit. sq='314'; ha=1; a=0; while ha: luv=int(sq[0])*100+int(sq[1])*10+int(sq[2])-100*a*a; a=a+1; if luv<0: ha=0;

a=a-2; ha=1; b=0; while ha: luv2=int(sq[0])*100+int(sq[1])*10+int(sq[2])-100*a*a-(20*a+b)*b; b=b+1; if luv2<0: ha=0; b=b-2;

ha=1; c=0; while ha: luv3=100*(int(sq[0])*100+int(sq[1])*10+int(sq[2])-100*a*a-(20*a+b)*b)-c*(200*a+20*b+c); c=c+1; if luv3<0: ha=0; c=c-2;

print('Square root of ',sq , ' ',10*a+b,'.',c)

#Maclaurin expansion of all trignometric and hyperbolic functions n=100 def hfactorial(n): s=1; for j in range(1,n+1): s=s*j return s

def hsin(x): return x-x*x*x/6+x*x*x*x*x/120-x*x*x*x*x*x*x/5040;

def hcos(x): return 1-x*x/2+1/24*x*x*x*x-x*x*x*x*x*x/720;

def htan(x): return x+x*x*x/3+2/15*x*x*x*x*x+17/315*x*x*x*x*x*x*x+62/2035*x*x*x*x*x*x*x*x*x;

def h2cos(x): s=0.0; for j in range(n): s=s+(-1)**j/hfactorial(2*j)*(x**(2*j)) return s

def h2sin(x): s=0.0; for j in range(n): s=s+(-1)**j/hfactorial(2*j+1)*(x**(2*j+1)) return s

def h2sinh(x): s=0.0; for j in range(n): s=s+1/hfactorial(2*j+1)*(x**(2*j+1)) return s

def h2atanh(x): s=0.0; for j in range(1,n): s=s+1/(2*j-1)*(x**(2*j-1)) return s

def h2atan(x): s=0.0; for j in range(1,n): s=s+(-1)**(j+1)/(2*j-1)*(x**(2*j-1)) return s

def h2ln1px(x): s=0.0; for j in range(1,n): s=s+(-1)**(j+1)/j*(x**(j)) return s def h2erf(x): s=0.0; for j in range(1,n): s=s+2/np.sqrt(np.pi)*(-1)**j/(2*j+1)/hfactorial(j)*(x**(2*j+1)) return s

def h2exp(x): s=0.0; for j in range(1,n): s=s+1/hfactorial(j)*(x**(j)) return s

def h2acot(x): s=0.0; for j in range(1,n): s=s+(-1)**j/(2*j+1)*(x**(2*j+1)) return np.pi/2-s

def h2cosh(x): s=0.0; for j in range(1,n): s=s+1/hfactorial(2*j)*(x**(2*j)) return s

print('h2cos(3.14)', h2cos(3.14/2),'h2sin(0.1)' , h2sin(0.1),'h2sinh(0.1)', h2sinh(0.1))

print('pi, e ',4*h2atan(1),exp(1)) """ import numpy as np import matplotlib.pyplot as plt x=np.arange(0,0.5,0.1) plt.plot(x,h2sin(x),x,h2cos(x),x,h2exp(x),x,h2erf(x),x,h2cosh(x),x,h2acot(x),x,h2erf(x),x,h2ln1px(x),x,h2atan(x),x,h2atanh(x)) plt.show() """ I hope all museums in the world show the derivation of pi and e with a video or a computer.


119 views0 comments

Recent Posts

See All

Faith

[12/22, 04:58] Dr. Harish Ravi: **The Role of Harish and All Samhitas as Rama and Sita** In a serene village nestled between the hills,...

Constant and string theory..

[12/22, 01:01] Dr. Harish Ravi: A physics joke wouly be F=ma^2/1 m/s^2 [12/22, 01:05] Dr. Harish Ravi: If I had asked this question in...

Didn't know cheap price of glue gun

PIf I buy random metal pipes and welding on amazon will someone buy welded sawed andfiled shape . or shall we settle for superglue and...

bottom of page