Skip to content

Fix mask generation for 32-bit targets - #19

Open
mihaip wants to merge 1 commit into
nadavrot:mainfrom
mihaip:main
Open

mihaip wants to merge 1 commit into
nadavrot:mainfrom
mihaip:main

Conversation

@mihaip

@mihaip mihaip commented Sep 21, 2026

Copy link
Copy Markdown

utils::mask returned a usize, which is only 32-bit wide on those targets. This resulted in incorrect mask values being generated in Float::from_bits (not all 52 bits were covered).

Switch it to returning a u64, which also lets us drop now-unnecessary casts.

This fixes uses of arpfloat when targeting WebAssembly (and specifically mihaip/infinite-mac#465).

utils::mask returned a usize, which is only 32-bit wide on those targets. This
resulted in incorrect mask values being generated in Float::from_bits (not all
52 bits were covered).

Switch it to returning a `u64`, which also lets us drop now-unnecessary casts.
mihaip added a commit to mihaip/snow that referenced this pull request Sep 21, 2026
mihaip added a commit to mihaip/snow that referenced this pull request Oct 2, 2026
mihaip added a commit to mihaip/snow that referenced this pull request Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant