<commit_before>package org.decimal4j.jmh.value;

import java.util.Random;

import org.decimal4j.scale.Scales;

/**
 * Describes the type of benchmark. This information is used when the benchmark
 * state is initialized to constrain the random generation of the test values,
 * for instance to avoid overflows or division by zero.
 */
public enum BenchmarkType {
	Add {
		@Override
		public long randomSecond(ValueType valueType, int scale, long first) {
			//avoid overflows
			long second = valueType.random(SignType.ALL);
			while ((first ^ second) >= 0 & (first ^ second) < 0) {
				//overflow, try again
				second = valueType.random(SignType.ALL);
			}
			return second;
		}
	},
	Subtract {
		@Override<commit_msg>checked add-benchmark: fixed random generation of overflow-free values<commit_after>package org.decimal4j.jmh.value;

import java.util.Random;

import org.decimal4j.scale.Scales;

/**
 * Describes the type of benchmark. This information is used when the benchmark
 * state is initialized to constrain the random generation of the test values,
 * for instance to avoid overflows or division by zero.
 */
public enum BenchmarkType {
	Add {
		@Override
		public long randomSecond(ValueType valueType, int scale, long first) {
			//avoid overflows
			long second = valueType.random(SignType.ALL);
			while ((first ^ second) >= 0 & (first ^ (first + second)) < 0) {
				//overflow, try again
				second = valueType.random(SignType.ALL);
			}
			return second;
		}
	},
	Subtract {
		@Override
{'fraction_non_alphanumeric': 0.09700996677740864, 'fraction_numerical': 0.0053156146179402, 'mean_word_length': 3.7358490566037736, 'pattern_counts': {'":': 0, '<': 5, '<?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': '4437703', 'n_tokens_mistral': 505, 'n_tokens_neox': 444, 'n_words': 153}