View Single Post
ramsey2879
#1
Feb27-12, 10:03 AM
P: 894
In:list5 = Import["Composites.csv"]; (*imports a list of odd integers each less than 1000000*)
Timing[f=Compile[{{Caa,_Integer},{S0,_Integer},{S1,_Integer},{Co,_Integer}},
Module[{xCo=Co,xS0=S0,xS1=S1,Temp},While[Temp=Mod[6 xS1-xS0-6,Caa];xCo>0&&Temp>=1,
xS0=xS1;xS1=Temp;xCo--];
xCo]];
count = Length[list5];
list3=Reap[While[count>0,
Caa= list5[[count]];Sow[Caa];Co=Round[(Caa-2)/2];S0=2;S1=3;
So = f[Caa,S0,S1,Co]; Sow[So];
count--]]]
results in red msg:
{3827} in position 1 should be a machine size Integer,
{13067} in position 1 should be a machine size Integer, etc
These are integers from the imported list. I am at loss as how to correct this error. Please help.
PS when I switched the positions of Caa and Co in the compiled function, I get in red {1913} in position 1 should be a machine sized integer, etc.
Phys.Org News Partner Science news on Phys.org
Experts defend operational earthquake forecasting, counter critiques
EU urged to convert TV frequencies to mobile broadband
Sierra Nevada freshwater runoff could drop 26 percent by 2100