public class NumericalMethodsFunctions extends Object
| Constructor and Description |
|---|
NumericalMethodsFunctions() |
| Modifier and Type | Method and Description |
|---|---|
static BigDecimal |
arccosCompute(BigDecimal value,
MathContext mc)
Calculates the
arccosine of a value in radians
using arctan of the value. |
static BigDecimal |
arcsinCompute(BigDecimal value,
MathContext mc)
Calculates the
arcsine of a value in radians
using arctan of the value. |
static BigDecimal |
arctanTaylorSeries(BigDecimal value,
MathContext mc)
Calculates the
arctangent of a value in radians
using Taylor series expansion. |
static BigDecimal |
cosTaylorSeries(BigDecimal angle,
MathContext mc)
Calculates the
cosine of an angle in radians
using Taylor series expansion. |
protected static BigDecimal |
expTaylorSeries(BigDecimal exponent,
MathContext mc)
Calculates
eexponent using Taylor series
expansion. |
protected static BigDecimal |
lnNewtonRaphson(BigDecimal value,
MathContext mc)
Calculates
loge value using the Newton-Raphson
method. |
protected static BigDecimal |
rootNewtonRaphson(BigDecimal base,
long exponent,
MathContext mc)
Calculates the
exponentth root of
base using Newton-Raphson method. |
protected static BigDecimal |
sinTaylorSeries(BigDecimal angle,
MathContext mc)
Calculates the
sine of an angle in radians
using Taylor series expansion. |
protected static BigDecimal |
sqrtNewtonRaphson(BigDecimal value,
MathContext mc)
Calculates the square root of
value using Newton-Raphson. |
static BigDecimal |
tanCompute(BigDecimal angle,
MathContext mc)
Calculates the
tangent of an angle in radians
using values for sine and cosine. |
protected static BigDecimal expTaylorSeries(BigDecimal exponent, MathContext mc)
eexponent using Taylor series
expansion. The result is rounded according to the passed context
mc. One must give values close to 1 for
exponent, otherwise the series may not converge.exponent - the value to which e is raised.mc - rounding mode and precision for the result of this operation.eexponentprotected static BigDecimal lnNewtonRaphson(BigDecimal value, MathContext mc)
loge value using the Newton-Raphson
method. The result is rounded according to the passed context
mc.value - calculates log of this value.mc - rounding mode and precision for the result of this operation.loge valueprotected static BigDecimal rootNewtonRaphson(BigDecimal base, long exponent, MathContext mc)
exponentth root of
base using Newton-Raphson method. The result is rounded
according to the passed context mc.base - the number to be rooted.exponent - the order of rootingmc - rounding mode and precision for the result of this operation.base(1/exponent)protected static BigDecimal sinTaylorSeries(BigDecimal angle, MathContext mc)
sine of an angle in radians
using Taylor series expansion. The result is rounded according to the
passed context mc.angle - the angle in radians.mc - rounding mode and precision for the result of this operation.sin (angle)protected static BigDecimal sqrtNewtonRaphson(BigDecimal value, MathContext mc)
value using Newton-Raphson.
The result is rounded according to the passed context mc.value - the number to be rooted.mc - rounding mode and precision for the result of this operation.value(1/2)public static BigDecimal cosTaylorSeries(BigDecimal angle, MathContext mc)
cosine of an angle in radians
using Taylor series expansion. The result is rounded according to the
passed context mc.angle - the angle in radians.mc - rounding mode and precision for the result of this operation.cos (angle)public static BigDecimal tanCompute(BigDecimal angle, MathContext mc)
tangent of an angle in radians
using values for sine and cosine. The result is rounded according to the
passed context mc.angle - the angle in radians.mc - rounding mode and precision for the result of this operation.tan (angle)public static BigDecimal arcsinCompute(BigDecimal value, MathContext mc)
arcsine of a value in radians
using arctan of the value. The result is rounded according to the passed
context mc.value - the number whose arcsine is to be found.mc - rounding mode and precision for the result of this operation.sin-1(value)public static BigDecimal arccosCompute(BigDecimal value, MathContext mc)
arccosine of a value in radians
using arctan of the value. The result is rounded according to the passed
context mc.value - the number whose arccosine is to be found.mc - rounding mode and precision for the result of this operation.cos-1(value)public static BigDecimal arctanTaylorSeries(BigDecimal value, MathContext mc)
arctangent of a value in radians
using Taylor series expansion. The result is rounded according to the
passed context mc.value - the number whose arctangent is to be found.mc - rounding mode and precision for the result of this operation.tan-1(value)Copyright © 2016. All rights reserved.