private static final Object bitCast(final Number o1, final Number o2, final long value) {
        if (o1 instanceof Long || o2 instanceof Long) {
            return value;
        }
        if (o1 instanceof Integer || o2 instanceof Integer) {
            return (int) value;
        }
        if (o1 instanceof Short || o2 instanceof Short) {
            return (short) value;
        }
        if (o1 instanceof Byte || o2 instanceof Byte) {
            return (byte) value;
        }
        return value;
    }