Work with exact rational functions
Construct, cancel, compose, and reactively update callable RationalFunction values.
Load the focused plugin. Its .rf and .rationalFunction aliases are the same callable value, and .poly loads as its exact dependency.
Convert a symbolic or structural form
.R() mirrors Polynomial .P(). An explicit symbolic input is the clearest choice when other names are coefficients.
The named backtick header is useful when bare free symbols would be ambiguous.
Polynomial promotion and field operations
After .ratfun is loaded, / between Polynomials creates a RationalFunction. The usual field operations stay in that semantic type. //, %, and /% remain the distinct quotient/remainder operations supplied by .algebra.
Composition
Calling with a Polynomial or RationalFunction substitutes it and returns a canonical RationalFunction, or the narrower Polynomial type if the resulting denominator is 1.
Reactive coefficients
Canonicalization evaluates coefficients exactly when a value is built. Reactive definitions rebuild the RationalFunction whenever a read dependency changes; ordinary definitions remain snapshots.
Cancellation and domains
RationalFunctions use reduced fraction-field semantics. Cancelled source restrictions are not remembered.
Here R(1) is 2. Use .fracfun when the removable hole at 1 must remain part of the source-domain meaning.
Choose and verify an explicit rational form
Canonical equality remains independent of display. These presentations retain their exact transformation data and reconstruct the source before reporting a verified result.