I have a c++ code in visual studio 2015 c++11. The code does EXP of
val = 7.3526137268510955991
double myCalulatedEXP= EXP(val);
//Lets print
std::cout.precision(20);
std::cout<<myCalulatedEXP;
On one machine I get 1560.2693207530153359 and on the other, I get 1560.2693207530151085 See that last 4 digits does not match causing trouble for me. Though the difference is small it multiplies and adds up to a bigger difference later on.
Both machines have same processor identifier .
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 63 Stepping 2, GenuineIntel
Both machines have same OS via
`systeminfo | findstr /B /C:"OS Name" /C:"OS Version"`
OS Name: Microsoft Windows Server 2012 R2 Standard
OS Version: 6.3.9600 N/A Build 9600
Both are windows server 2012 machines. I ran dependency walker to check if they are having different dlls versions linked . Both are exactly the same .
Please suggest
1) What can cause such differences?
2) How can I avoid such differences?
3) If processor, OS, dlls are the same can I still expect different results