This week's giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Production-Ready Serverless (Operational Best Practices) and have Yan Cui on-line!
See this thread for details.
Win a copy of Production-Ready Serverless (Operational Best Practices) this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Ron McLeod
  • Tim Moores
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Vijitha Kumara

Help me to Create a small symbolic math library  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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
 
Saloon Keeper
Posts: 9986
206
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to CodeRanch!

What have you tried? What are you stuck on?
 
Saloon Keeper
Posts: 5326
143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That looks like an assignment you should be doing in order to learn something. So: what do you have so far, and where are you stuck making progress?
 
Seriously? That's what you're going with? I prefer this tiny ad:
global solutions you can do in your home or backyard
https://coderanch.com/t/708587/global-solutions-home-backyard
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!