[GiNaC-list] GiNaC on the web
danipro93 at gmail.com
Tue Nov 2 20:57:21 CET 2021
Hey GiNaC people!
First of all, thank you for this great library!
I'm working on a web-based interface for GiNaC as a hobby project and I
wanted to share it with you.
You can try a demo frontend here: https://daninet.github.io/ginac-wasm/
Source code: https://github.com/Daninet/ginac-wasm
functions like add(), mul() for the different operations. The GiNaC
calls are too expensive. The demo frontend includes a PEG-based parser
const GiNaC = await initGiNaC('./dist/ginac.wasm');
const g = getFactory();
GiNaC(g.mul(g.numeric('2'), g.pow(g.symbol('x'), g.numeric('2'))));
GiNaC(g.series(g.atan(g.symbol('x')), g.symbol('x'), g.numeric('5')));
On my computer, the native ginsh is about 10x faster in estimating Pi with
Machin’s formula compared to my WebAssembly port. That's because of the
expensive C++ exception mocks generated by Emscripten, which compensate for
the lack of native browser support for exceptions in WebAssembly. I
estimate that the performance gap can be brought down to about 1/2 of
native performance once the native exception instructions are getting
wildly available in browsers.
to stabilize the API and implement the remaining features.
What do you think? Do you have any suggestions or ideas?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the GiNaC-list