<commit_before>/**
 * 
 */
package orc.runtime.sites.core;

import java.math.BigDecimal;
import java.math.BigInteger;

import orc.error.runtime.TokenException;
import orc.runtime.Args;
import orc.runtime.Args.NumericBinaryOperator;
import orc.runtime.sites.EvalSite;
import orc.type.ArrowType;
import orc.type.Type;

/**
 * @author dkitchin, quark
 *
 */
public class Inequal extends EvalSite {
	private static NumericBinaryOperator<Boolean> op
	= new NumericBinaryOperator<Boolean>() {
		public Boolean apply(BigInteger a, BigInteger b) {
			return !a.equals(b);
		}
		public Boolean apply(BigDecimal a, BigDecimal b) {
			return !a.equals(b);
		}
		public Boolean apply(int a, int b) {
			return a != b;
		}
		public Boolean apply(long a, long b) {
			return a != b;
		}
		public Boolean apply(byte a, byte b) {
			return a != b;
		}
		public Boolean apply(short a, short b) {
			return a != b;
		}
		public Boolean apply(double a, double b) {
			return a != b;
		}
		public Boolean apply(float a, float b) {
			return a != b;
		}
	};
	
	public Object evaluate(Args args) throws TokenException {
		Object a = args.getArg(0);
		Object b = args.getArg(1);
		if (a == null || b == null) {
			return a != b;
		} else if (a instanceof Number && b instanceof Number) {
			return Args.applyNumericOperator((Number)a, (Number)b, op);
		} else {
			return !a.equals(b);
		}
	}
	
	public static Type type() {
		return new ArrowType(Type.BOT, Type.BOT, Type.BOOLEAN);
	}
}<commit_msg>Ensure inequal is truly the logical inverse of equal.<commit_after>/**
 * 
 */
package orc.runtime.sites.core;

import java.math.BigDecimal;
import java.math.BigInteger;

import orc.error.runtime.TokenException;
import orc.runtime.Args;
import orc.runtime.Args.NumericBinaryOperator;
import orc.runtime.sites.EvalSite;
import orc.type.ArrowType;
import orc.type.Type;

/**
 * @author dkitchin, quark
 *
 */
public class Inequal extends EvalSite {
	public Object evaluate(Args args) throws TokenException {
		Object a = args.getArg(0);
		Object b = args.getArg(1);
		return !Equal.eq(a, b);
	}
	
	public static Type type() {
		return new ArrowType(Type.BOT, Type.BOT, Type.BOOLEAN);
	}
}
{'fraction_non_alphanumeric': 0.12725590004627488, 'fraction_numerical': 0.0018509949097639982, 'mean_word_length': 3.710239651416122, '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': '5620769', 'n_tokens_mistral': 809, 'n_tokens_neox': 746, 'n_words': 206}