from Hacker News

Are there programming languages which handle equations?

by tornadofart on 7/7/23, 12:44 AM with 8 comments

Take for example the equation

U = R * I

In many languages, I have to re-implement this equation according to which values are known and which are not. Something like this pseudocode:

var u = r * i;

...

var r = u / i;

...

var i = u / r;

Are there systems that allow me to only program the equation and compute the missing values depending on what is known? At least for simple algebra with real numbers?