Open
Description
Bug Report
Crystal currently allows writing arbitrarily large literals for floating types:
puts 2e999 # => Infinity
However, the same isn't true for macro code.
There, crystal uses the String#to_f*
methods to parse integer literals.
Since these methods raise when the output would exceed the data type's precision, they also can't be parsed there:
{% puts 2e999 %} # => 2e999
{% puts 2e999 * 1 %} # => Error: Invalid Float64: "2e999"
Expected behaviour
I would expect numbers of the same type to behave exactly the same in crystal code and macro code.