pyeval cannot read an exponent float literal
compiler/builtin/pyeval.pas:1881 sees e/E after a number and calls
TokError('float exponent literals not supported in M1').
How it was found, and why it is not urgent
It is not reachable from ordinary Pascal or from a compiled lambda. It became
reachable on 2026-09-12, when PyLambdaTokText learned to render a tkFloat at
all — the lambda body is reconstructed as text from its token span and handed to
pyeval, so the literal's spelling has to survive a round trip.
Rather than ship a compile-to-run-time regression, the exponent spelling is refused at compile time with its own message:
error: Nil Python: an exponent float literal (1e3) is not supported in an
interpreted lambda/closure body yet — write it in plain decimal
That arm is reached ONLY while building the pyeval text, so a lifted body is unaffected.
Why not normalise the spelling instead
.5 -> 0.5 IS done, because the two spellings are the same decimal and no bits
move. An exponent is not that: turning 1e300 into plain decimal is a 300-digit
string, and turning 2E-3 into 0.002 is a re-rounding. The normalisation that
is exact by inspection was taken; this one needs the tokenizer.
What a fix must not do
Do not implement the exponent by a for i := 1 to exp do fv := fv * 10 loop —
that compounds rounding and would turn a loud refusal into a quiet wrong value,
which is strictly worse than today.