| 145 | * Routing: |
| 146 | * - any complex operand → `complexFn` |
| 147 | * - bignum preferred and `bigFn` available → `bigFn` |
| 148 | * - otherwise → machine `fn`; if `fn` returns NaN on finite inputs and a |
| 149 | * `complexFn` is available, retry it (the value may be complex for real |
| 150 | * inputs, e.g. EllipticK(m) for m > 1). |
| 151 | * |
| 152 | * A NaN result on finite inputs yields `undefined` (the expression stays |
| 153 | * symbolic) rather than a NaN literal: the kernels use NaN to signal |
| 154 | * "outside the implemented domain", not a mathematical result. |
| 155 | */ |
| 156 | export function applyN( |