decimal
decimal copied to clipboard
long formula convert to decimal expression
hi, I wonder if there's any way to convert a long formula into decimal expression, for example
A * D - B * C * E + C * D * E + C * E / F
HI @huahuayu. Do you mean converting math formula (string representation) to code?
For example: A * B + C
to A.Mul(B).Add(C)
? If so this library does not support such a feature, but I believe it would be quite fun side project that could use decimal
as dependency :)
Do you mean converting math formula (string representation) to code? For example: A * B + C to A.Mul(B).Add(C)?
Exactly! I am looking for helper tools like you description. For long formula it's so painful to convert it to decimal
.
I don't know any of such tools, unfortunately, but I believe there are a few of them already somewhere on the internet in different languages (at least for simple math formulas). Try to find them and rewrite them in Go using decimal
:D