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
I was bit yesterday by ([uint8(1)]+1000)[1] != uint8(1)+1000. It looks like this change was made as a result of #1641. Is this documented? I don't know the rationale behind that change, but this seems more dangerous for integers than for floats, since for floats there is usually only loss of precision and if the new float is too large to fit you'll get Inf, whereas for integers there is silent truncation. Depending on our strategy here, this might be a dup of #5413.
The text was updated successfully, but these errors were encountered:
I'd say #5413 is the best approach, but it would be nice to have an easy way to ask for array+n with overflow or saturation. Hard to think of a good notation for that.
I was bit yesterday by
([uint8(1)]+1000)[1] != uint8(1)+1000
. It looks like this change was made as a result of #1641. Is this documented? I don't know the rationale behind that change, but this seems more dangerous for integers than for floats, since for floats there is usually only loss of precision and if the new float is too large to fit you'll getInf
, whereas for integers there is silent truncation. Depending on our strategy here, this might be a dup of #5413.The text was updated successfully, but these errors were encountered: