title: Quadratic Sieve algorithm implementation
body: <p>I have the following code for Quadratic Sieve Algorithm in Maple:</p>
  
  <pre><code>  QS := proc(n::posint, (c := 1.2, cutoff := 7))
  local st, nfb, svprimes, svplogs, nsvprimes, M, sievearray, polroots,
        kn, b, fb, rels, A, deps;
  st := Initialization(n,c,cutoff);
  print('Using multiplier : ');
  print(st[1]);
  print('Using smoothness bound: ');
  print(st[3]);
  fb := st[6];
  print('Size of factor base: ');
  print(ArrayNumElems(st[6]));
  svprimes := st[7];
  svplogs := st[8];
  nsvprimes := st[9];
  M := st[5];
  sievearray := st[11];
  polroots := st[10];
  print('Sieving interval of length : ');
  print(2*M+1);
  sieve(svprimes, svplogs, nsvprimes, M, sievearray, polroots);
  print('Sieving done, searching for smooth values.. ');
  kn := st[2];
  b := st[4];
  rels := FindRelations[kn, b, M, fb, sievearray];
  print(LinearAlgebra:-RowDimension(A));
  gc();
  print('Solving a matrix of size ');
  print(LinearAlgebra:-Dimension(A));
  deps := Dependencies(A);
  print('Number of linear dependien fopund: ');
  print(nops(deps));
  print('Factors: ');
  FindFactors(n, rels, deps)
  and proc:
  </code></pre>
  
  <p>It is giving the following error: Error, "<code>(</code>" unexpected. Can someone help me fix this? Also I was wondering if it was possible to convert this code into a Java or C code? I am not asking anyone to do so but wondering if it is possible. I will give it a try myself but if anyone wants, your welcome to. This is a quadratic sieve algorithm for which I am trying to factor over a hundred digit long number with.</p>