Skip to content
Snippets Groups Projects
Commit fa7860cd authored by Frederik Hennig's avatar Frederik Hennig
Browse files

fix mathematics

parent 1eccb2c2
No related branches found
No related tags found
1 merge request!430Jupyter Inspection Framework, Book Theme, and Initial Drafts for Codegen Reference Guides
Pipeline #70932 passed
......@@ -450,6 +450,15 @@ We use the integer remainder ({any}`int_rem`) to distinguish between even- and o
set the start value accordingly using {any}`sp.Piecewise <sympy.functions.elementary.piecewise.Piecewise>`,
and use a step size of two:
$$
start(y)=
\begin{cases}
0 & \quad \text{if } y \% 2 = 0 \\
1 & \quad \text{otherwise}
\end{cases}
$$
```{code-cell} ipython3
from pystencils.sympyextensions.integer_functions import int_rem
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment