Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- #include <cmath>
- #include <thread>
- using namespace std;
- double dA50 = 8.0;
- double dAto95 = 3.0;
- double dAlpha = 1.0;
- double getResult(int param) {
- double dRet = 0.0;
- double dTemp = (dA50-param)/dAto95;
- dRet = dAlpha/(1.0+pow(19.0,dTemp));
- return dRet;
- }
- int main() {
- cout << std::setprecision(20);
- cout << "Local = " << getResult(1) << endl;
- cout << "Local = " << getResult(1) << endl;
- std::thread nt([](){
- cout << "Thread = " << getResult(1) << endl;
- cout << "Thread = " << getResult(1) << endl;
- });
- nt.join();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment