Overflows in numeric casts #1459
aleksanderkatan
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
WGSL conversion rules are quite complicated. For example,
u32(f32(-1))
equals0u
, andu32(i32(-1))
equals4294967295u
. On JS side,f32(-1) === i32(-1)
, therefore we cannot emulate the overflow logic fully. I think it needs discussing what exactly should JS behaviour be.Beta Was this translation helpful? Give feedback.
All reactions