Java examples for java.lang:double
calculate inverse document frequency between two double
//package com.java2s; public class Main { public static void main(String[] argv) throws Exception { double docN = 2.45678; double docNt = 2.45678; System.out.println(calcIDF(docN, docNt)); }/*from w w w .j ava 2s . c o m*/ /** * @param docN * @param docNt number of doc having the term t * @return */ public static double calcIDF(double docN, double docNt) { return Math.log10((double) docN / (double) docNt); } }