Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**************************************
     * Math relevant
     *************************************/

    public static double calculatePDFOfNormalDistribution(double mean, double std, double value) {
        double prob = Math.pow(Math.E, -Math.pow(value - mean, 2) / 2 / Math.pow(std, 2))
                / (Math.sqrt(Math.PI * 2) * std);
        if (prob > 1)
            System.out.println(mean + " " + std + " " + value);
        return prob;
    }
}