Java Long Number Divide divide(long l1, long l2)

Here you can find the source of divide(long l1, long l2)

Description

divide

License

Apache License

Declaration

private static double divide(long l1, long l2) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.text.DecimalFormat;
import java.text.NumberFormat;

import java.util.Locale;

public class Main {
    private static double divide(long l1, long l2) {
        NumberFormat nf = DecimalFormat.getInstance(Locale.ENGLISH);
        DecimalFormat df = (DecimalFormat) nf;
        df.applyPattern("#.##########");
        double percent = (double) l1 / (double) l2;
        return Double.parseDouble(df.format(percent));
    }// www.  j  a  va  2  s. c o  m
}

Related

  1. div_ceil(long n, long d)
  2. divCeil(long a, long b)
  3. divide(final long dividend, final long divisor)
  4. divide(Long d1, Long d2)
  5. divide(long dividend, long divisor)
  6. divideAndRoundUp(long x, long y)
  7. divideForMean(long sum, long count)
  8. divideLongBy1000(long l)
  9. divideLongs(Long a, Long b)