/*
Copyright (C) 2008 Richard Gomes
This source code is release under the BSD License.
This file is part of JQuantLib, a free-software/open-source library
for financial quantitative analysts and developers - http://jquantlib.org/
JQuantLib is free software: you can redistribute it and/or modify it
under the terms of the JQuantLib license. You should have received a
copy of the license along with this program; if not, please email
. The license is also available online at
.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the license for more details.
JQuantLib is based on QuantLib. http://quantlib.org/
When applicable, the original copyright notice follows this notice.
*/
package org.jquantlib.math;
/**
* @author
*/
final public class Constants {
//
// private constructor
//
private Constants() {
//deliberate
}
//
// Defines public constants
//
/**
* {@latex$ sqrt(2*pi) }
*/
public final static double M_SQRT2PI = 2.50662827463100050242;
/**
* {@latex$ e }
*/
public final static double M_E = 2.71828182845904523536;
public final static double M_LOG2E = 1.44269504088896340736;
public final static double M_LOG10E = 0.434294481903251827651;
/**
* {@latex$ 1 / log(10) }
*/
public final static double M_IVLN10 = 0.434294481903251827651;
/**
* {@latex$ ln(2) }
*/
public final static double M_LN2 = 0.693147180559945309417;
/**
* {@latex$ ln(2) }
*/
public final static double M_LOG2_E = 0.693147180559945309417;
/**
* {@latex$ ln(10) }
*/
public final static double M_LN10 = 2.30258509299404568402;
/**
* {@latex$ pi }
*/
public final static double M_PI = 3.141592653589793238462643383280;
/**
* {@latex$ 2 pi }
*/
public final static double M_TWOPI = (M_PI * 2.0);
/**
* {@latex$ pi/2 }
*/
public final static double M_PI_2 = 1.57079632679489661923;
/**
* {@latex$ pi/4 }
*/
public final static double M_PI_4 = 0.785398163397448309616;
/**
* {@latex$ 3 pi/4}
*/
public final static double M_3PI_4 = 2.3561944901923448370E0;
/**
* {@latex$ sqrt(pi) }
*/
public final static double M_SQRTPI = 1.77245385090551602792981;
/**
* {@latex$ 1/pi }
*/
public final static double M_1_PI = 0.318309886183790671538;
/**
* {@latex$ 2/pi }
*/
public final static double M_2_PI = 0.636619772367581343076;
/**
* {@latex$ 1/sqrt(pi) }
*/
public final static double M_1_SQRTPI = 0.564189583547756286948;
/**
* {@latex$ 2/sqrt(pi) }
*/
public final static double M_2_SQRTPI = 1.12837916709551257390;
/**
* {@latex$ sqrt(2) }
*/
public final static double M_SQRT2 = 1.41421356237309504880;
/**
* {@latex$ 1/sqrt(2) }
*/
public final static double M_SQRT_2 = 0.7071067811865475244008443621048490392848359376887;
/**
* {@latex$ sqrt(1/2) }
*/
public final static double M_SQRT1_2 = 0.7071067811865475244008443621048490392848359376887;
public final static double M_LN2LO = 1.9082149292705877000E-10;
public final static double M_LN2HI = 6.9314718036912381649E-1;
/**
* {@latex$ sqrt(3) }
*/
public final static double M_SQRT3 = 1.73205080756887719000;
/**
* {@latex$ 1/log(2) }
*/
public final static double M_INVLN2 = 1.4426950408889633870E0;
/**
* {@latex$ 1/sqrt(2) * 1/sqrt(pi) }
*/
public final static double M_1_SQRT2PI = M_SQRT_2*M_1_SQRTPI;
public final static int QL_MIN_INTEGER = Integer.MIN_VALUE;
public final static int QL_MAX_INTEGER = Integer.MAX_VALUE;
public final static double QL_MIN_REAL = -Double.MAX_VALUE;
public final static double QL_MAX_REAL = Double.MAX_VALUE;
public final static double QL_MIN_POSITIVE_REAL = Double.MIN_VALUE;
public final static double QL_EPSILON = Math.ulp(1.0);
public static final int NULL_INTEGER = Integer.MAX_VALUE;
public static final int NULL_NATURAL = NULL_INTEGER;
public static final double NULL_REAL = Double.MAX_VALUE; // QL define as max double: std::numeric_limits::max)
public static final double NULL_RATE = NULL_REAL;
public static final double NULL_TIME = NULL_REAL;
public static final double DBL_MIN = Double.MIN_VALUE;
public static final double DBL_MAX = Double.MAX_VALUE;
}
Ads help maintain this website.