(expr: unknown)
| 67 | ) { |
| 68 | // Check if this transcendental simplifies to an exact rational value |
| 69 | // (e.g., ln(e) = 1, sin(0) = 0). If so, it's not truly a |
| 70 | // "symbolic transcendental" that needs to be preserved. |
| 71 | const simplified = expr.simplify(); |
| 72 | // If the simplified result is exact (integer or rational), |
| 73 | // it doesn't need symbolic preservation |
| 74 | if (simplified.isRational) { |
| 75 | return false; |
| 76 | } |
| 77 | return true; |
| 78 | } |
| 79 | // Recursively check sub-expressions |
no test coverage detected