(x: Expression)
| 57 | * Eisenstein series at τ = i) are preserved. A non-Gaussian complex float |
| 58 | * (`1.5+2i`) still numericizes — it never was representable exactly. |
| 59 | * |
| 60 | * Non-number-literal expressions (symbols like `Pi`, unevaluated functions) |
| 61 | * are treated as exact here: they have no float to lose, and any exact |
| 62 | * reduction for them is the caller's job, not this predicate's. |
| 63 | */ |
| 64 | export function isExactNumber(x: Expression): boolean { |
| 65 | if (!isNumber(x)) return true; |
| 66 | if (x.isExact) return true; |
no test coverage detected