Vocabulary

math.dual

Inputs

Outputs

None

Word description

Similar to execute, but promotes word to operate on duals.

Notes

Uses the derivative word-prop, which holds a list of quotations giving the partial derivatives of the word with respect to each of its arguments. This can be set using DERIVATIVE:. Once a derivative has been defined for a word, dual-op makes it easy to extend the definition to dual numbers.

Examples

See also

define-dual, DERIVATIVE:

Definition

math.dual

Inputs

word | a word |

Outputs

None

Word description

Similar to execute, but promotes word to operate on duals.

Notes

Uses the derivative word-prop, which holds a list of quotations giving the partial derivatives of the word with respect to each of its arguments. This can be set using DERIVATIVE:. Once a derivative has been defined for a word, dual-op makes it easy to extend the definition to dual numbers.

Examples

USING: math math.dual math.derivatives.syntax math.functions ;
DERIVATIVE: sin [ cos * ]
M: dual sin \sin dual-op ;

USING: math math.dual math.derivatives.syntax ;
DERIVATIVE: * [ drop ] [ nip ]
: d* ( x y -- x*y ) * dual-op ;

See also

define-dual, DERIVATIVE:

Definition

This documentation was generated offline from a
`load-all`

image. If you want, you can also
browse the documentation from within the UI developer tools. See
the Factor website
for more information.

Factor 0.99 x86.64 (2203, heads/master-424edf64aa, Mar 8 2023 13:48:50)