<commit_before>config var N = 4;
config var epsilon = 1.0e-5;
var D = [1..N, 1..N];
var BD= [0..N+1, 0..N+1];


def main(){
  var A : [BD] real(64);
  var tmp : [BD] real(64);
  var delta : real(64);

  // set bottom border to 1.0
  [i in 1..N] A(N+1, i) = 1.0;
  do {
    [ij in D] tmp(ij) = (A(ij + (0, 1))  + 
                         A(ij + (1, 0))  + 
                         A(ij + (0, -1)) + 
                         A(ij + (-1, 0))) / 4.0;
    delta = 0;

    [ij in D] {
      delta = delta + abs(tmp(ij) - A(ij));
      A(ij) = tmp(ij);
    }
  } while (delta > epsilon);
  writeln(A(D));
}

def +(a: (int, int), b: (int, int)){
  return (a(1) + b(1), a(2) + b(2));<commit_msg>Fixed my jacobi test that was incorrect with parallel default iterators.<commit_after>config var N = 4;
config var epsilon = 1.0e-5;
var D = [1..N, 1..N];
var BD= [0..N+1, 0..N+1];


def main(){
  var A : [BD] real(64);
  var tmp : [D] real(64);
  var delta : real(64);

  // set bottom border to 1.0
  [i in 1..N] A(N+1, i) = 1.0;
  do {
    [ij in D] tmp(ij) = (A(ij + (0, 1))  + 
                         A(ij + (1, 0))  + 
                         A(ij + (0, -1)) + 
                         A(ij + (-1, 0))) / 4.0;

    delta = + reduce abs(tmp - A[D]);
    A[D] = tmp;
  } while (delta > epsilon);
  writeln(A(D));
}

def +(a: (int, int), b: (int, int)){
  return (a(1) + b(1), a(2) + b(2));
{'fraction_non_alphanumeric': 0.22727272727272727, 'fraction_numerical': 0.05266955266955267, 'mean_word_length': 1.6673076923076924, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5876016', 'n_tokens_mistral': 649, 'n_tokens_neox': 599, 'n_words': 174}