static NumberInfo getHighestCommonNumberInfo(final boolean forceFloatingPoint, final Number... numbers) {
        int bits = 8;
        boolean fp = forceFloatingPoint;
        for (final Number number : numbers) {
            if (!isNumber(number)) continue;
            final Class<? extends Number> clazz = number.getClass();
            if (clazz.equals(Byte.class)) continue;
            if (clazz.equals(Short.class)) {
                bits = Math.max(bits, 16);
            } else if (clazz.equals(Integer.class)) {
                bits = Math.max(bits, 32);
            } else if (clazz.equals(Long.class)) {
                bits = Math.max(bits, 64);
            } else if (clazz.equals(BigInteger.class)) {
                bits = 128;
            } else if (clazz.equals(Float.class)) {
                bits = Math.max(bits, 32);
                fp = true;
            } else if (clazz.equals(Double.class)) {
                bits = Math.max(bits, 64);
                fp = true;
            } else /*if (clazz.equals(BigDecimal.class))*/ {
                bits = 128;
                fp = true;
                break; // maxed out, no need to check remaining numbers
            }
        }
        return  new NumberInfo(bits, fp);
    }
@author Daniel Kuppitz (http://gremlin.guru)
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/util/NumberHelper.java