public class FieldSqrt extends UnaryFunction
x_{n+1} = (x_n + S / x_n) / 2
where S is the input number scaled to lie between 1/16 and 16.
Algorithm will stop until convergence or the maximum number of iterations is reached.curNumberOfParameters, name, NaN, numberOfParameters| Constructor and Description |
|---|
FieldSqrt(FieldI f,
int num_itts)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
eval(java.lang.Object arg) |
int |
getNum_itts() |
void |
setNum_itts(int num_itts) |
java.lang.String |
toString() |
runasArray, asBool, asDouble, asInt, asLong, asStrictInt, asString, checkNumberOfParameters, getName, getNumberOfParameters, setCurNumberOfParameters, setName, toStringpublic FieldSqrt(FieldI f, int num_itts)
f - the field for all computationsnum_itts - maximum number of iterationspublic java.lang.Object eval(java.lang.Object arg)
throws EvaluationException
eval in class UnaryFunctionEvaluationExceptionpublic int getNum_itts()
public void setNum_itts(int num_itts)
public java.lang.String toString()
toString in class PostfixMathCommandCopyright © 2018 Singular Systems http://www.singularsys.com/jep