3 ms·
Our favorite WebAssembly is an example! It specifically excludes trigonometry from the spec, because real hardware doesn't produce exactly the same results. So
by cyberax 2mo ago
Our favorite WebAssembly is an example! It specifically excludes trigonometry from the spec, because real hardware doesn't produce exactly the same results.
So mathematical libraries in WASM reimplement the trigonometric functions using series.
Example: https://github.com/WebAssembly/wasi-libc/blob/2e6fb9d8ee0cdf9e431fbcabe8af3115de000a13/libc-top-half/musl/src/math/atan.c#L63 https://github.com/WebAssembly/wasi-libc/blob/2e6fb9d8ee0cdf...