public abstract class MathUtil extends Object
For the Freely Distributable C-library conforming to IEEE-754 floating point math.
,
For the GNU C variant of the same IEEE-754 routines.
,
Another take on the IEEE-754 routines.
,
Yet another take on the IEEE-754 routines.
,
://today.java.net/pub/a/today/2007/11/06/creating-java-me-math-pow-method .html For other approximations.
,
://martin.ankerl.com/2007/10/04/optimized-pow-approximation-for-java- and-c-c/ For fast but rough approximations.
,
://martin.ankerl.com/2007/02/11/optimized-exponential-functions-for-java / For more fast but rough approximations.
Constructor and Description |
---|
MathUtil() |
Modifier and Type | Method and Description |
---|---|
static double |
atan(double a)
Return the arctangent of a, call it b, where a = tan(b).
|
static double |
atan2(double b,
double a)
For any real arguments x and y not both equal to zero, atan2(y, x) is the angle in radians between the positive x-axis of a plane and the point
given by the coordinates (x, y) on it.
|
static double |
copysign(double x,
double y) |
static double |
exp(double a)
Return Math.E to the exponent a.
|
static double |
gcd(double a,
double b) |
static double |
log(double a)
Return the natural logarithm, ln(a), as it relates to Math.E.
|
static double |
negateExact(double a)
Returns the negation of the argument, throwing an exception if the result exceeds a
double . |
static double |
pow(double a,
double b)
Return a to the power of b, sometimes written as a ** b but not to be confused with the bitwise ^ operator.
|
static double |
scalbn(double x,
int n)
scalbn (double x, int n) scalbn(x,n) returns x* 2**n computed by exponent manipulation rather than by actually performing an exponentiation or a
multiplication.
|
public MathUtil()
public static final double exp(double a)
public static final double log(double a)
public static final double pow(double a, double b)
public static final double atan(double a)
public static final double atan2(double b, double a)
public static final double scalbn(double x, int n)
public static final double copysign(double x, double y)
public static double negateExact(double a)
double
.a
- the value to negateArithmeticException
- if the result overflows a doublepublic static double gcd(double a, double b)
Copyright © 2005–2017 Jean-Marie Dautelle, Werner Keil, V2COM. All rights reserved.