<commit_before>require File.expand_path(File.dirname(__FILE__) + '/spec_helper')

describe Math do

	it 'should solve a quadratic formula'
	it 'should get the number of permutations with n and k'
	it 'should get the number of combinations with n and k'
	it 'should get the number of steps to finish the Collatz Conjecture'
	it 'should get the length of a hypotenuse with the Pythagorean theorem'
	it 'should determine if three given numbers form a Pythagorean triplet'
	it 'should calculate a series of Fibonacci numbers of a specified length'

end<commit_msg>Write some more tests for Math<commit_after>require File.expand_path(File.dirname(__FILE__) + '/spec_helper')

describe Math do

	it 'should solve a quadratic formula' do
		Math.quadratic(1, 2, 3).should == 'change me'
		Math.quadratic(-1, -2, -3).should == 'change me'
		Math.quadratic(1, 1, 1).should == 'change me'
		Math.quadratic(1, 0, 0).should == 0
		Math.quadratic(0, 1, 2).should == nil
	end

	it 'should get the number of permutations with n and k' do
		Math.permutations(10, 5).should == 30_240
		Math.permutations(5, 10).should == nil
		Math.permutations(5, 5).should == 120
		Math.permutations(5, 0).should == 0
		Math.permutations(0, 5).should == nil
		Math.permutations(0, 0).should == 0
		Math.permutations(-5, 5).should == nil
		Math.permutations(5, -5).should == nil
		Math.permutations(-5, -5).should == nil
	end

	it 'should get the number of combinations with n and k' do
		Math.permutations(10, 5).should == 30_240
		Math.permutations(5, 10).should == nil
		Math.permutations(5, 5).should == 120
		Math.permutations(5, 0).should == 0
		Math.permutations(0, 5).should == nil
		Math.permutations(-5, 5).should == nil
		Math.permutations(5, -5).should == nil
		Math.permutations(-5, -5).should == nil
	end

	it 'should get the number of steps to finish the Collatz Conjecture' do
		Math.collatz(-1).should == nil
		Math.collatz(0).should == nil
		Math.collatz(1).should == 0
		Math.collatz(2).should == 1
		Math.collatz(7).should == 16
		Math.collatz(100).should == 25
	end

	it 'should get the length of a hypotenuse with the Pythagorean theorem'
	it 'should determine if three given numbers form a Pythagorean triplet'

	it 'should calculate a series of Fibonacci numbers of a specified length' do
		Math.fibs(-1).should == nil
		Math.fibs(0).should == []
		Math.fibs(1).should == [1]
		Math.fibs(2).should == [1, 1]
		Math.fibs(5).should == [1, 1, 2, 3, 5]
		Math.fibs(10).should == [1, 1, 2, 3, 5, 8, 13, 21, 34, 55]
	end

end
{'fraction_non_alphanumeric': 0.13072937425269032, 'fraction_numerical': 0.046233559186927065, 'mean_word_length': 3.911937377690802, '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': '4180672', 'n_tokens_mistral': 1002, 'n_tokens_neox': 872, 'n_words': 289}