Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
the resistor values were generated using a uniform distribution random number generator (values 9 to 11 ohms)
So each value is equally likely?
i can give you the program
As soon as I trash this computer and buy an Apple. Almost all new stuff I try to use gives me weird results, installs that crash halfway through, new pop-up screens, etc..
Hi Willbe,
Yes, each value is equally likely.
The program is in the form of a text file, not an .exe file.
This means you can easily look at it and see that there is
nothing unusual inside it. It opens in Notepad or other
text editor like any other text file. A typical line
might look like this:
a=b+c
or
for k=1 to 10 do
a=a+1
end for
include misc.e
include file.e
include get.e
include msgbox.e
include uppersort.e
printf(1,"%s\n",{""})
atom T,R
T=0.1
R=10
atom S1,T1,R1,R2,RT,Tx,Tsum
sequence Boxes
Boxes=repeat(0,101)
with trace
function abs(atom x)
if x<0 then
return -x
else
return x
end if
end function
function RandResistor(atom R, atom T)
--This functions distribution was tested.
atom S1,T1
S1=rand(1000)
if S1<=500 then
S1=-1
else
S1=1
end if
T1=rand(1000)/1000
return R+S1*T*T1*R
end function
trace(1)
Tsum=0
for k=1 to 10000000 do
R1=RandResistor(R,T)
R2=RandResistor(R,T)
RT=R1+R2
Tx=(RT/(2*R))-1
Tsum+=Tx
if k/10000=floor(k/10000) then
?Tsum
end if
Tx=abs(Tx*1000)
for j=1+1e-6 to 101 do
if Tx<=j then
Boxes[j]+=1
if j=11 then
?Tx
sleep(1)
end if
exit
end if
end for
end for
Tsum=0
for k=1 to length(Boxes) do
printf(1,"%d\n",{Boxes[k]})
Tsum+=Boxes[k]
end for
?Boxes
?Boxes/10000000
?Tsum
atom fno
fno=open("Report.txt","w")
print(fno,Boxes)
close(fno)
sleep(222)