This week's book giveaway is in the Kotlin forum. We're giving away four copies of Kotlin for Android App Development and have Peter Sommerhoff on-line! See this thread for details.
Problem description
In symbolic math, I write an expression, and store the expression instead of evaluating it directly.
You can then write:
Variable<0> x(“x”);
auto f = cos(2*x);
f is now a synonym of cos(2*x). You can evaluate the function by typing f(x=1.2), and get the result
given x = 1.2. (which will be sin(2.4))
Hint:Using function overloading and operator overloading