Please help me represent a mathematical function in C++

Hi all

I want to represent a Math equation in C++ but I am having some trouble doing that because the equation contains "e" for exponent and I dont know how to express that in C++. Here is the equation, y = (x*e EXP x) - 2
https://en.wikipedia.org/wiki/E_%28mathematical_constant%29

Choose how precise you want to be, and stick it into a constant.

EDIT: Even better, consider keskiverto's post below.
Last edited on
Is it really the constant e that is required, or something like: http://en.cppreference.com/w/cpp/numeric/math/exp
Topic archived. No new replies allowed.