> NaNs (Not a Number, usually referring to positive/negative Infinite values in floats and integers)
Huh? This sounds totally incorrect to me.
Re:Wasmer 2.0
by syrusakbary on Thursday June 17, 2021 @12:46PM
(#27541636)
Sorry about that! I was trying to explain it so people with little understanding could see how NaNs are handled/generated in a Wasm context (for example: 0/0 will trigger a NaN), but it's true that Infinite and NaNs are not the same. I'll correct my comment :)
Re:Wasmer 2.0
by mattgreenrocks on Friday June 18, 2021 @09:46PM
(#27557017)
Makes sense. NaNs are super weird: quiet/signaling variants, as well as they're technically a set of values, WRT to which bits indicate them.
We had a custom NaN "canonicalizer" that was always canonicalizing NaNs (that means: making sure the NaN bits were always the same in any chipset) regardless of use case and need. We took a look on how other runtimes were doing it more optimally and realized we could use LLVM intrinsic calls for math operations so LLVM would handle it directly.
If you are curious about the tech details, here's the PR! https://github.com/wasmerio/wasmer/pull/2161