F
F
Fortunato282018-05-13 07:05:30
C++ / C#
Fortunato28, 2018-05-13 07:05:30

How to pass a mathematical function to c++ code?

The program at some point calculates a function, for example: 5*(x-6)^3-23. I hardcoded it, everything works. And if there are many such mathematical functions, and they can be different? How to give the user the opportunity to enter such a mathematical expression himself?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir T, 2018-05-13
@Fortunato28

https://stackoverflow.com/questions/9329406/evaluation...

R
Rsa97, 2018-05-13
@Rsa97

Write your own compiler for mathematical expressions or look for a ready-made library.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question