<functionIterates>
<functionIterates> is a Math Operator
component that evaluates a function over a specified number of iterations of its argument.
Attributes and Properties
Attributes for <functionIterates>
Number display (5)
avoidScientificNotationboolean. Default value: false. Whether to render numbers in full decimal form rather than scientific notation.
displayDecimalsinteger. Default value: 2. Number of decimal places to display when rendering this number.
displayDigitsinteger. Default value: 3. Number of significant digits to display when rendering this number.
displaySmallAsZeronumber. Default value: 1e-14. Threshold below which numbers are displayed as zero.
padZerosboolean. Default value: false. Whether to pad displayed numbers with trailing zeros to fill the requested digits/decimals.
Other (5)
forceNumericboolean. Default value: false. Whether to force numeric evaluation.
forceSymbolicboolean. Default value: false. Whether to force symbolic evaluation.
functionfunction. The function to iterate.
initialValuemath. Default value: . Starting value passed to the function on the first iteration.
numIteratesinteger. Default value: 0. Number of iterations to compute.
Common to all components (9)
copyreference. Create an independent copy of another component by reference. Enter a references a $name.
disabledboolean. Default value: false. Whether this component is disabled and cannot be interacted with.
extendreference. Extend another component by reference, inheriting its children and attributes. Enter a reference as $name.
fixedboolean. Default value: false. Whether this component's value is fixed and cannot be modified.
fixLocationboolean. Default value: false. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).
hideboolean. Default value: false. Whether to hide this component from the rendered output.
isResponseboolean. Default value: false. Whether this component is treated as a response for the purposes of assessment.
nametext. The name used to reference this component from elsewhere in the document.
styleNumberinteger. Default value: 1. The style number used to select this component's visual styling from the available style definitions.
Properties for <functionIterates name="f">
Number display (5)
$f.avoidScientificNotationboolean. Whether to render numbers in full decimal form rather than scientific notation.
$f.displayDecimalsinteger. Number of decimal places to display when rendering this number.
$f.displayDigitsinteger. Number of significant digits to display when rendering this number.
$f.displaySmallAsZeronumber. Threshold below which numbers are displayed as zero.
$f.padZerosboolean. Whether to pad displayed numbers with trailing zeros to fill the requested digits/decimals.
Other (12)
$f.allIteratesmathList. All computed iterates of the function.
$f.allIteratesWithInitialmathList. All iterates including the initial value.
$f.disabledboolean. Whether this component is disabled and cannot be interacted with.
$f.finalIteratemath. The last iterate value.
$f.fixedboolean. Whether this component's value is fixed and cannot be modified.
$f.fixLocationboolean. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).
$f.forceNumericboolean. Whether to force numeric evaluation.
$f.forceSymbolicboolean. Whether to force symbolic evaluation.
$f.iterates[ math ]. The list of iterate values.
$f.numDimensionsinteger. Number of dimensions of each iterate.
$f.numIteratesinteger. Number of iterations to compute.
Common to all components (4)
$f.doenetMLtext. The DoenetML source code that produced this component.
$f.hideboolean. Whether to hide this component from the rendered output.
$f.isResponseboolean. Whether this component is treated as a response for the purposes of assessment.
$f.styleNumberinteger. The style number used to select this component's visual styling from the available style definitions.
Examples
Example: simple function iteration
In this example, the <function> is first defined, then referenced
in the <functionIterates> component in the function attribute.
The numIterates attribute, which specifies the number of iterations to
perform, and the initialValue attribute are required.