hey there guys. this im officially my first post on this forum. seems pretty impressive how much there is on offer, however its only C++ im looking for assistance with today.
i have two questions.
i am creating a program with lots of variables, most of which should be random numbers at the start and then get changed while the program continues, currently i just have cin commands to select them all, but it would make it easier if i could make them random numbers. is there a command to do this, and which library would i have to include?
currently i have :
float W1A;
float W1B;
float W2A;
float W2B;
then
cout << endl << "select each weight (random number between -1 and +1): "
<< endl << "W1A: ";
cin >> W1A;
cout << endl << "W1B: ";
cin >> W1B;
cout << endl << "W2A: ";
cin >> W2A;
cout << endl << "W2B: ";
cin >> W2B;
cout << endl << "WAC: ";
cin >> WAC;
2nd question, i am trying to use these numbers in a calculation and the natural exponential function doesnt seem to work, not even with math.h inlcluded,
code:
OUTA = 1/(1 + exp^-((W1A*pix1)+(W2A*pix2)));
if anyone can help that would be amazing,
thanks in advance.