Answer the question
In order to leave comments, you need to log in
How to correctly multiply a polynomial by a number?
Why can't I multiply a polynomial by a number?
[Error] no match for 'operator<<' (operand types are 'std::basic_ostream' and 'Polynom')
Call:
In class:cout << "5 * g = " << g * 5 << endl;
Polynom Polynom::operator *(double c) {
return multiple(c, *this);
}
Polynom multiple(double c, const Polynom& p) {
if (c == 0) {
Polynom result;
return result;
} else {
int degree = p.degree;
double* new_exponents = new double[degree];
for (int i = 0; i < degree; i++) {
new_exponents[i] = c * p.exponents[i];
}
Polynom result(degree, new_exponents);
delete[] new_exponents;
return result;
}
}
ostream& operator <<(ostream& os, Polynom& p) {
os << "{ degree: " << p.degree << "; coefficients: " << p.getCoefficientsStr() << " }";
return os;
}
Answer the question
In order to leave comments, you need to log in
But as far as I understand, this is unprofitable. it will have more cores than server hardware.
there is such a moment
server Windows:
for one physical server you need to buy licenses for at least 16 cores, even if it really has only 2 of them
, starting with 16 cores in packages of 2 licenses or 8
each, then you need either a kala user or a kala device
here if you have 65 users work in turn on 10 PCs, then we take a device of feces, if 65 users and 65 PCs and users still cling to the server through mobile devices, then we take users.
If the server is used as a web server - with an unknown number of connections - there is a special RDP license for this,
if there is one connection, then you do not need to buy
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question