[ home ] [ math / cs / ai / phy / as / chem / bio / geo ] [ civ / aero / mech / ee / hdl / os / dev / web / app / sys / net / sec ] [ med / fin / psy / soc / his / lit / lin / phi / arch ] [ off / vg / jp / 2hu / tc / ts / adv / hr / meta / tex ] [ chat ] [ wiki ]

Viewing source code

The following is the source code for post >>>/cs/160

In my downtime, I'm writing a CAS in Python. It has to be from scratch, because I want it to fit on my calculator, and all of the solutions out there import a lot of data. Currently, there are two separate programs, one which can do full polynomial arithmetic, but you have to type in the polynomial in program form, as a list of coefficients starting from x^0. I'm working on merging it with the CAS interface, which will evaluate expressions recursively. For example: (sin x)^2 is sin inputted into the function f(y) = y^2. Though I don't have time to make this logic perfect, it will be interesting to learn how to program a u-substitution for arbitrary input.