log10 Factorial - Java java.lang

Java examples for java.lang:Math Algorithm

Description

log10 Factorial

Demo Code


//package com.java2s;

public class Main {
    public static double log10Factorial(double n) {
        double f = 0;

        for (double i = n; i > 1; i--) {
            f += Math.log10(i);//  w  ww.  j av  a 2  s  . c  o  m
        }

        return f;
    }
}

Related Tutorials