Symbolic computing in Forth?
From
marcel hendrix@mhx@iae.nl to
comp.lang.forth on Fri Oct 30 14:03:38 2026
From Newsgroup: comp.lang.forth
I'd like to add a symbolic solver to my iSPICE and SIMPWL network
analysis tools. Such a solver is able to return, e.g., the solution to a voltage divider (R1=9k, R2=1k) across a voltage source (V1=10V) as "V1*R2/(R1+R2)" instead of as "0.1".
I remember, but absolutely can't find anymore, a paper/book that showed
how to do this by defining a peculiar loss-free transformation of the
input values. AFAIR, it scaled values such that their bit-patterns did
not overlap. (Yes, there probably is a link with current CLF threads on variable precision floating point and lossless number input and output).
It was then possible, maybe with limitations, to disassemble the
rational number output "0.1" (or maybe "1 / 10") back to the formula "V1*R2/(R1+R2) => (10 * 1k) / (1k + 9k)" by identifying the products,
sums, and ratios of 10, 1k, and 9k.
Of course this was a very old paper.
It would be acceptable if only one, or a few, component values are
symbolic and the rest numeric, as for even modest size circuits the
truly symbolic output becomes so voluminous that all insights on the
physical circuit behavior are lost anyway.
-marcel
--- Synchronet 3.22a-Linux NewsLink 1.2