4 ms·
I went through the same exercise implementing trig functions for scheme in webassembly... It was a rabbit hole for sure https://github.com/PollRobots/scheme/b
by pacaro 3y ago
I went through the same exercise implementing trig functions for scheme in webassembly...
It was a rabbit hole for sure
https://github.com/PollRobots/scheme/blob/main/scheme.wasm/src/library/trig.wat#L369 https://github.com/PollRobots/scheme/blob/main/scheme.wasm/s...
[Edit: above is just the range from 0-π/4, the branch cuts for cos are at https://github.com/PollRobots/scheme/blob/main/scheme.wasm/src/library/trig.wat#L266 https://github.com/PollRobots/scheme/blob/main/scheme.wasm/s... ]