[ 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 ]
/cs/ - Computer Science Catalog
25 Dec 2021 | Mathchan is launched into public |
Sort by:
Image size:
R: 12 / I: 0
Writing a simple CAS in Python
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.
R: 0 / I: 0 (sticky)
This board is for the discussion of computer science.
This includes topics such as data structures, algorithms, computation theory, programming languages, compilers, etc.
Inline code can be embedded in several different ways:
Block-level code can also be embedded in several ways:
Syntax highlighting can be added by specifying a programming language like
This includes topics such as data structures, algorithms, computation theory, programming languages, compilers, etc.
- Homework questions must be posted in /hr/ - Homework/Requests
- Career advice belongs to /adv/ - Career Advice
- Testing Mathchan's markup should only be done on /tex/ - LaTeX
- Questions about the board itself can be asked in /meta/ - Meta Questions
Inline code can be embedded in several different ways:
\inline{ ... }
or\lstinline{ ... }
commands\begin{inline} ... \end{inline}
environment\< ... \>
or` ... `
special blocks
Block-level code can also be embedded in several ways:
\code{ ... }
,\codeblock{ ... }
commands\begin{code} ... \end{code}
,\begin{codeblock} ... \begin{codeblock}
or\begin{lstlisting} ... \end{lstlisting}
environments``` ... ```
special block
Syntax highlighting can be added by specifying a programming language like
\begin[language=java]{code} ... \end{code}or like
```java ... ```.