class LongOperations implements MathOperations<Long>, Comparator<Long> {

    @Override
    public int getExponentInScientificNotation( Long value ) {
        long v = Math.abs(value);
        int exp = 0;
        if (v > 1l) {
            while (v >= 10l) {
                v /= 10l;
                ++exp;
            }
        } else if (v == 0l) {
        } else if (v < 1l) {
            while (v < 1l) {
                v *= 10l;
                --exp;
            }
        }
        return exp;
    }

}