Skip to content
This repository has been archived by the owner on Aug 29, 2024. It is now read-only.

compute a reverse expression #248

Open
yboujraf opened this issue Feb 15, 2020 · 1 comment
Open

compute a reverse expression #248

yboujraf opened this issue Feb 15, 2020 · 1 comment

Comments

@yboujraf
Copy link

Dear @michaelmior , @shreyansb , @hmaurer , @jdolecki , @josdejong

I am looking to compute the reverse on an expression.

Use case :

$ is the output value for example of a sensor and the manufacturer gives us the expr1 as formula to convert the $ to a display value for the user

But when the user wants to interact with the sensor, he needs to translate the display value to an expr2 to be sure the sensor could interpret the value.

That's my example :

The user write the expr1 and the library compute the reverse of the expr1 to expr2
expr1 = 1 + log($, 2)
expr2 = 2^($ - 1)

expr1 = sin($ / 7.43) where $ is of type INTEGER
expr2 = int(7.43 * asin($))

expr1 = $ - log($ / (e^(-$) * $^sin(1 / $)), 10)
expr2 = exercise left to the reader

Thanks in advance if you could help us to find a solution of our issue.

Best Regards
Youssef

@josdejong
Copy link
Contributor

For reference, see: josdejong/mathjs#1699. It's not trivial to achive but should be possible at least for a basic set of functions and operators.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants