Open non-Jedi opened 5 years ago
Yeah, anyone have an example that isn't fixed by literal and constant propogation? It's hard to write a simple example now that fails because that tends to auto-fix them lol.
I think that this would suffice:
julia> x = -5; 2 ^ x
ERROR: DomainError with -5:
Cannot raise an integer x to a negative power -5.
Make x or -5 a float by adding a zero decimal (e.g., 2.0^-5 or 2^-5.0 instead of 2^-5), or write 1/x^5, float(x)^-5, x^float(-5) or (x//1)^-5
Although it does lead to the unfortunate added burden of explaining why this is different than 2^(-5)
.
WhyJulia states this gives an error, bt within the page it shows a regular Float64 result.