Algebrite, a computer algebra system in JavaScript
algebrite.org
algebrite.org
I'm doing some coursework for my MSc in math, and have taken to using CASs (Maxima, and Yacas via RYacas) to explore/validate my assignment questions/answers. The automatic TeX formatting in those systems has been an essential feature.
(Kotlin compiles to js or jvm byte code)
Combine typed arrays with BLAS and you have yourself a numpy (well, kind of). In Node you can move performance-critical code to C++, which does have integers. Browser support of typed arrays is a bit disappointing, but it's getting better.
Disclaimer: I'm developing https://github.com/mateogianolio/vectorious
But yeah, for normal numeric operations, the default `number` double-precision is default.
That said, typed arrays of all the common types (u8,u16,u32 and their signed analogues) now exist in JS and are very important for performance reasons, particularly with WebGL and Emscripten.
You can also use typed arrays to get a single integer of the type you desire. For example, to convert a -1 to a signed integer, try this in your console:
(new Uint32Array([-1]))[0]
You can then compare the result to what I mention above: -1>>>0
And this one gives what you would expect: var i = (new Uint8Array([-1]))[0]
console.log(i)http://webcache.googleusercontent.com/search?q=cache:DKKZb1P...
Discussion: https://news.ycombinator.com/item?id=8677721
The API seems fairly similar to SymPy. It would be great to have a CAS that can perform simple operations in the browser, and ship more complicated things to a SymPy backend (or another CAS).
http://live.sympy.org/ is great, but do we really need to call the backend for everything?
Computers have advanced but calculators haven't.
Calculators are only focused on school kids, not on people who really need to get things done.
I'd love to have octave or scipy on a piece of dedicated hardware.
Not knowing much about how a CAS is implemented, I'm curious -- what is it that causes the integration demo to take so much longer than the other examples? Does it have to do some kind of search to find the correct sequence of manipulations?
Edit: also the nonlinear square root term may cause difficulty.
People might find this interesting: Maple uses Clenshaw Curtis as the default, but will switch dynamically to Gaussian if singularities are detected.
However, as it gives as answer some multiple of pi, it must've performed symbolic integration, which also suits the general design of the library better. There are some methods for performing symbolic integration but often trial and error with lookup tables and tricks (substitution etc) is faster.
† ES2015 for the super-pedants :-)