You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
julia> (1:2) - (1:2)
ERROR: ArgumentError: step cannot be zero
and
julia> (1:1:2) - (1:1:2)
ERROR: ArgumentError: step cannot be zero
It would be more consistent to allow them, but then internal design of UnitRange and StepRange would need to change (and a tricky part is that the length can span from 0 to 2^(sizeof(type)*8) which is just one value too much to use the same storage type for values and for length).
Additionally we have the following problems with ragne:
julia> a = 2^60
1152921504606846976
julia> a:-a
1152921504606846976:1152921504606846975
julia> BigFloat(a):BigFloat(-a)
ERROR: ArgumentError: length cannot be negative, got -2305843009213693951
The text was updated successfully, but these errors were encountered:
Following the discussion on Slack.
Currently this works :
But these operations fail:
and
It would be more consistent to allow them, but then internal design of
UnitRange
andStepRange
would need to change (and a tricky part is that the length can span from0
to2^(sizeof(type)*8)
which is just one value too much to use the same storage type for values and for length).Additionally we have the following problems with ragne:
The text was updated successfully, but these errors were encountered: