ReferencefunctionIterates

<functionIterates>

List of values produced by iterating a function

<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)
avoidScientificNotation

boolean. Default value: false. Whether to render numbers in full decimal form rather than scientific notation.

displayDecimals

integer. Default value: 2. Number of decimal places to display when rendering this number.

displayDigits

integer. Default value: 3. Number of significant digits to display when rendering this number.

displaySmallAsZero

number. Default value: 1e-14. Threshold below which numbers are displayed as zero.

padZeros

boolean. Default value: false. Whether to pad displayed numbers with trailing zeros to fill the requested digits/decimals.

Other (5)
forceNumeric

boolean. Default value: false. Whether to force numeric evaluation.

forceSymbolic

boolean. Default value: false. Whether to force symbolic evaluation.

function

function. The function to iterate.

initialValue

math. Default value: \(_\). Starting value passed to the function on the first iteration.

numIterates

integer. Default value: 0. Number of iterations to compute.

Common to all components (9)
copy

reference. Create an independent copy of another component by reference. Enter a references a $name.

disabled

boolean. Default value: false. Whether this component is disabled and cannot be interacted with.

extend

reference. Extend another component by reference, inheriting its children and attributes. Enter a reference as $name.

fixed

boolean. Default value: false. Whether this component's value is fixed and cannot be modified.

fixLocation

boolean. Default value: false. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).

hide

boolean. Default value: false. Whether to hide this component from the rendered output.

isResponse

boolean. Default value: false. Whether this component is treated as a response for the purposes of assessment.

name

text. The name used to reference this component from elsewhere in the document.

styleNumber

integer. 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.avoidScientificNotation

boolean. Whether to render numbers in full decimal form rather than scientific notation.

$f.displayDecimals

integer. Number of decimal places to display when rendering this number.

$f.displayDigits

integer. Number of significant digits to display when rendering this number.

$f.displaySmallAsZero

number. Threshold below which numbers are displayed as zero.

$f.padZeros

boolean. Whether to pad displayed numbers with trailing zeros to fill the requested digits/decimals.

Other (12)
$f.allIterates

mathList. All computed iterates of the function.

$f.allIteratesWithInitial

mathList. All iterates including the initial value.

$f.disabled

boolean. Whether this component is disabled and cannot be interacted with.

$f.finalIterate

math. The last iterate value.

$f.fixed

boolean. Whether this component's value is fixed and cannot be modified.

$f.fixLocation

boolean. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).

$f.forceNumeric

boolean. Whether to force numeric evaluation.

$f.forceSymbolic

boolean. Whether to force symbolic evaluation.

$f.hidden

boolean. Whether this component is hidden from the rendered output.

$f.iterates

[ math ]. The list of iterate values.

$f.numDimensions

integer. Number of dimensions of each iterate.

$f.numIterates

integer. Number of iterations to compute.

Common to all components (4)
$f.doenetML

text. The DoenetML source code that produced this component.

$f.hide

boolean. Whether to hide this component from the rendered output.

$f.isResponse

boolean. Whether this component is treated as a response for the purposes of assessment.

$f.styleNumber

integer. 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.