<commit_before>var assert = require('assert')
  , Numeric = require('../index.js');

var numeric = new Numeric();


suite('numeric', function() {

  console.log('\n\n\033[34mTesting Standard Mathematics\033[0m');

  // numeric.addition
  test('addition should return the sum of items in an array', function(done) {
    assert.equal(6, numeric.addition([0,1,2,3]));

    done();
  });

  // numeric.subtraction
  test('subtraction should return the difference of items in an array', function(done) {
    assert.equal(0, numeric.subtraction([0,1,2,3]));

    done();
  });

  // numeric.product
  test('product should return the product of items in an array', function(done) {
    assert.equal(24, numeric.product([1,2,3,4]));

    done();
  });

  // numeric.factorial
  test('factorial should return the product of n * (n - 1) * (n - 2) * ... * 1', function(done) {
    assert.equal(24, numeric.factorial(4));

    done();
  });

  // numeric.gcd
  test('gcd should return the greatest common denominator of two integers', function(done) {
    assert.equal(6, numeric.gcd(1254, 5298));

    done();
  });

  // numeric.lcm
  test('lcm should return the least common multiple of two integers', function(done) {
    assert.equal(240, numeric.lcm(12, 80));

    done();
  });
});<commit_msg>addition is broken. See test.<commit_after>var assert = require('assert')
  , Numeric = require('../index.js');

var numeric = new Numeric();


suite('numeric', function() {

  console.log('\n\n\033[34mTesting Standard Mathematics\033[0m');

  // numeric.addition
  test('addition should return the sum of items in an array', function(done) {
    assert.equal(6, numeric.addition([0,1,2,3]));
    assert.equal(0, numeric.addition([0,-3,5,-2]));
    assert.equal(0.43, numeric.addition([0.03, 0.4]));
    done();
  });

  // numeric.subtraction
  test('subtraction should return the difference of items in an array', function(done) {
    assert.equal(0, numeric.subtraction([0,1,2,3]));
    done();
  });

  // numeric.product
  test('product should return the product of items in an array', function(done) {
    assert.equal(24, numeric.product([1,2,3,4]));
    assert.equal(-6, numeric.product([-3,2]));
    done();
  });

  // numeric.factorial
  test('factorial should return the product of n * (n - 1) * (n - 2) * ... * 1', function(done) {
    assert.equal(24, numeric.factorial(4));
    assert.equal(120, numeric.factorial(5));
    done();
  });

  // numeric.gcd
  test('gcd should return the greatest common denominator of two integers', function(done) {
    assert.equal(6, numeric.gcd(1254, 5298));
    assert.equal(1, numeric.gcd(78699786, 78978965));
    done();
  });

  // numeric.lcm
  test('lcm should return the least common multiple of two integers', function(done) {
    assert.equal(240, numeric.lcm(12, 80));

    done();
  });
});
{'fraction_non_alphanumeric': 0.17570422535211266, 'fraction_numerical': 0.04612676056338028, 'mean_word_length': 3.5601926163723916, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3469404', 'n_tokens_mistral': 1038, 'n_tokens_neox': 914, 'n_words': 232}