dfinity / motoko

Simple high-level language for writing Internet Computer canisters
Apache License 2.0
515 stars 97 forks source link

fix: reproduce and fix `motoko-base/issues/653` #4712

Closed ggreif closed 1 month ago

ggreif commented 1 month ago

Cf. fixes dfinity/motoko-base#653

It appears that a <> Big_int.zero_big_int blows up when a is zero. Weird. Eliminating the comparison doesn't hurt correctness, and is probably more efficient too, as negating zero should be cheap!

@timohanke feel free to review too!

github-actions[bot] commented 1 month ago

Comparing from 8d6841e820fa1a4ff3a4cd7158ea0a491ee48b77 to 5f9f320a0646a628c30d62f2e51019d2f827d089: The produced WebAssembly code seems to be completely unchanged.