We may write down the calculation formula of a distance measurement with the following LaTex string:
dist_{12} = \sqrt{ x^2 + y^2 }
dist_{13} = \sqrt{ z_{33}^2 + y^2 }
total = dist_{12} + dist_{13}
This looks good so far. If I really need to make a computer calculate these equations, then I need the following - eg. Python - code:
x = 1
y = 2
z_33 = 3
dist_12 = sqrt(x**2 + y**2)
dist_13 = sqrt(z_33**2 + y**2)
total = dist_12 + dist_13
print "Total distance is: ", total
As a result, I spent as twice as the effort actually needed.
However, if there was a way to use exact same LaTex formula (which may include integrals, derivatives, limits etc.) in a programming language (preferably Python, Javascript and Julia) we would re-use our efforts later in our real-world applications.
Is there any way to make this happen?
You can
Both alternatives avoid you having to re-type the equations.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With