|
|||||||||||||||||||
| 30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover | |||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| Constants.java | - | - | - | - |
|
||||||||||||||
| 1 |
package baseCode.math;
|
|
| 2 |
|
|
| 3 |
/**
|
|
| 4 |
* Used in some ports of statistical code.
|
|
| 5 |
*
|
|
| 6 |
* <hr>
|
|
| 7 |
* <p>Copyright (c) 2004 Columbia University
|
|
| 8 |
* @author pavlidis
|
|
| 9 |
* @version $Id: Constants.java,v 1.3 2005/01/05 17:59:19 pavlidis Exp $
|
|
| 10 |
*/
|
|
| 11 |
public abstract class Constants { |
|
| 12 |
|
|
| 13 |
public static final double TINY = 1e-20; |
|
| 14 |
public static final double SMALL = 1e-10; |
|
| 15 |
|
|
| 16 |
|
|
| 17 |
/* sqrt(2) */
|
|
| 18 |
public static final double M_SQRT_2 = 1.4142135623730950488016887242097; |
|
| 19 |
public static final double M_1_SQRT_2 = 0.707106781186547524400844362105; |
|
| 20 |
/* 1/sqrt(2) */
|
|
| 21 |
|
|
| 22 |
public static final double M_LN_2 = 0.693147180559945309417232121458176568; |
|
| 23 |
public static final double M_LOG10_2 = 0.301029995663981195213738894724493027; |
|
| 24 |
|
|
| 25 |
public static final double M_PI_half = 1.570796326794896619231321691640; |
|
| 26 |
|
|
| 27 |
/* 1/pi */
|
|
| 28 |
public static final double M_1_PI = 0.31830988618379067153776752674502872406891929148; |
|
| 29 |
|
|
| 30 |
/* pi/2 */
|
|
| 31 |
public static final double M_PI_2 = 1.57079632679489661923132169163975144209858469969; |
|
| 32 |
|
|
| 33 |
public static final double M_PI_4 = M_PI_2 / 2.0; |
|
| 34 |
|
|
| 35 |
/* sqrt(pi), 1/sqrt(2pi), sqrt(2/pi) : */
|
|
| 36 |
public static final double M_SQRT_PI = 1.772453850905516027298167483341; |
|
| 37 |
public static final double M_1_SQRT_2PI = 0.398942280401432677939946059934; |
|
| 38 |
public static final double M_SQRT_2dPI = 0.79788456080286535587989211986876; |
|
| 39 |
/* !* #endif /*4! */
|
|
| 40 |
|
|
| 41 |
/* log(sqrt(pi)) = log(pi)/2 : */
|
|
| 42 |
public static final double M_LN_SQRT_PI = 0.5723649429247000870717136756765293558; |
|
| 43 |
/* log(sqrt(2*pi)) = log(2*pi)/2 : */
|
|
| 44 |
public static final double M_LN_SQRT_2PI = 0.91893853320467274178032973640562; |
|
| 45 |
/* log(sqrt(pi/2)) = log(pi/2)/2 : */
|
|
| 46 |
public static final double M_LN_SQRT_PId2 = 0.225791352644727432363097614947441; |
|
| 47 |
} |
|
| 48 |
|
|
||||||||||