public long getMinimumDifference_as_long(){
        long diff = 0L;
        if(this.type==4 || this.type==5){
            ArrayMaths am = this.sort();
            long[] sorted = am.getArray_as_long();
            diff = sorted[1] - sorted[0];
            long minDiff = diff;
            for(int i=1; i<this.length-1; i++){
                diff = sorted[i+1] - sorted[i];
                if(diff<minDiff)minDiff = diff;
            }
        }
        else{
            throw new IllegalArgumentException("Minimum difference may only be returned as the same type as the type of the internal array - you are trying to return as long or Long the difference for a " + this.typeName[this.type] +"[] array");
        }
        return diff;
    }