Skip to content
Playground(another site)

bynk.lex.float_literal_overflow

Error A float literal does not fit a finite 64-bit float.

A Float is a 64-bit IEEE 754 double, and a literal must be a finite one: the largest is about 1.8e308. A literal past that would round to infinity, which no Float literal can spell, so it is refused rather than changed silently. Write a value in range.

Example

const Big: Float = 1e999 // ✗ past the largest double
const Big: Float = 1e308 // ✓

In the Book

See also

  • The grammar rule it governs: float_literal.
  • Every code in its category, Lexer, on the diagnostic index.
  • bynk explain bynk.lex.float_literal_overflow shows the same from the installed toolchain, without a network.