mathematics

Gunnar 2022-11-11T10:22:30.955909Z

Hello friends. I've been off the clojure train a while but I am now seriously considering an application. (Yes it seems like I'm asking almost the same question as the previous one, but since it is almost year old(!) I may as well start a new thread. I also need a little bit more help than "you could solve it with core.matrix", if you feel up for it. 🙏) I'd like a function that will solve a linear equation. Something like: I pass it an expression "A = (B+2) x C + 3 x D - E" (that can be EDN encoded somehow - I don't need a string parser), and I pass it a map that provides values for any N-1 of the variables. The function figures out which is the unknown variable, and solves for it. If the input is over-constrained or under-constrained it will report something useful about that. It's a bonus if it can do multiple equations / multiple unknowns, but at this time I don't think I need it. Any tips you might have? 🙏

Bobbi Towers 2022-11-12T18:20:53.723949Z

The closest thing to a complete Computer Algebra System in Clojure is #emmy. Are you aware of it? Either way, it's a very active channel and someone in there can probably help

Gunnar 2022-11-12T18:22:51.244559Z

No I was not aware. Just looking for something fairly simple but if this does algebra it should hopefully be applicable. Thanks for the tip!

Bobbi Towers 2022-11-12T18:32:17.546129Z

https://github.com/Sophia-Gold/symbolic-algebra this is a library that has some nice functions for representing polynomials and performing operations on them

✅ 1