TLDR: Precompute things into trees, then math becomes I = T(S) - a transformation on state
MarkdownPastebin: Free markdown pastebin service with rich text editor, preview and easy to use
markdownpastebin.com/
MarkdownPastebin