Skip to content

Commit

Permalink
Correct double literal example (#414)
Browse files Browse the repository at this point in the history
`7.` is not in fact a valid double literal per the grammar or the `cel-go` implementation. But `.700e1` is, and shows off some other aspects of flexibility in the grammar.
  • Loading branch information
hudlow authored Nov 12, 2024
1 parent c629b2b commit b34f962
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/langdef.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ floating-point. We only support positive, decimal integer literals; negative
integers are produced by the unary negation operator. Note that the integer 7 as
an `int` is a different value than 7 as a `uint`, which would be written `7u`.
Double-precision floating-point is also supported, and the integer 7 would be
written `7.`, `7.0`, `7e0`, or any equivalent representation using a decimal
written `7.0`, `7e0`, `.700e1`, or any equivalent representation using a decimal
point or exponent.

Note that currently there are no automatic arithmetic conversions for the
Expand Down

0 comments on commit b34f962

Please sign in to comment.