<commit_before>package gf256

import (
	"testing"
)

func TestElementAddition(t *testing.T) {
	expected := Element(112)
	actual := Element(100).Add(Element(20))
	if actual != expected {
		t.Errorf("Expected %v, but was %v", expected, actual)
	}
}

func TestElementLog(t *testing.T) {
	expected := Element(226)
	actual := Element(90).Log()
	if actual != expected {
		t.Errorf("Expected %v, but was %v", expected, actual)
	}
}

func TestElementMultiplication(t *testing.T) {
	expected := Element(254)
	actual := Element(90).Mul(21)
	if actual != expected {
		t.Errorf("Expected %v, but was %v", expected, actual)
	}
}

func TestElementDivision(t *testing.T) {
	expected := Element(189)
	actual := Element(90).Div(Element(21))
	if actual != expected {
		t.Errorf("Expected %v, but was %v", expected, actual)
	}
}<commit_msg>Added tests for div error bounds.<commit_after>package gf256

import (
	"testing"
)

func TestElementAddition(t *testing.T) {
	expected := Element(112)
	actual := Element(100).Add(Element(20))
	if actual != expected {
		t.Errorf("Expected %v, but was %v", expected, actual)
	}
}

func TestElementLog(t *testing.T) {
	expected := Element(226)
	actual := Element(90).Log()
	if actual != expected {
		t.Errorf("Expected %v, but was %v", expected, actual)
	}
}

func TestElementMultiplication(t *testing.T) {
	expected := Element(254)
	actual := Element(90).Mul(21)
	if actual != expected {
		t.Errorf("Expected %v, but was %v", expected, actual)
	}
}

func TestElementDivision(t *testing.T) {
	expected := Element(189)
	actual := Element(90).Div(Element(21))
	if actual != expected {
		t.Errorf("Expected %v, but was %v", expected, actual)
	}
}

func TestElementZeroDivision(t *testing.T) {
	expected := Element(0)
	actual := Element(0).Div(Element(2))
	if actual != expected {
		t.Errorf("Expected %v, but was %v", expected, actual)
	}
}

func TestElementDivideByZero(t *testing.T) {
	defer func() {
		m := recover()
		if m != "div by zero" {
			t.Error(m)
		}
	}()

	Element(2).Div(Element(0))
	t.Error("Shouldn't have been able to divide those")
}
{'fraction_non_alphanumeric': 0.1653771760154739, 'fraction_numerical': 0.031431334622823985, 'mean_word_length': 4.517333333333333, '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': '6675686', 'n_tokens_mistral': 790, 'n_tokens_neox': 733, 'n_words': 187}