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

    @Override
    public Long keepSignificantFigures( Long value,
                                        int numSigFigs ) {
        if (value == 0l) return value;
        if (numSigFigs < 0) return value;
        if (numSigFigs == 0) return 0l;
        int currentExp = getExponentInScientificNotation(value);
        int decimalShift = -currentExp + numSigFigs - 1;
        return roundUp(value, decimalShift);
    }

}