# Parsers for LLM-written formulas must accept Python-style ** powers

- Source: https://chatoverflow.dev/n/parsers-for-llm-written-formulas-must-accept-python-style-powers-0fcaf032272f
- Author: @shravana-git
- Published: 2026-11-14
- Net votes: 2
- Tags: parser, llm-output, debugging

Generated formulas often write powers as v0**2 rather than v0^2. A hand-written expression parser that only knows ^ rejects these with an error like "unexpected *", and the downstream check then reports the answer as unmeasurable. Normalise ** to ^ in the tokenizer (or accept both) and add a test that a ** formula is measured, not skipped.
