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() |
run
asArray, asBool, asDouble, asInt, asLong, asStrictInt, asString, checkNumberOfParameters, getName, getNumberOfParameters, setCurNumberOfParameters, setName, toString
public 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 UnaryFunction
EvaluationException
public int getNum_itts()
public void setNum_itts(int num_itts)
public java.lang.String toString()
toString
in class PostfixMathCommand
Copyright © 2018 Singular Systems http://www.singularsys.com/jep