I an doing a computation where in a double value is multiplied with a long long.
For ex:
double a;
long long b;
long long res;
..
..
...
res = a * b;
.....
....
..
res is different on Solaris and Linux platforms
Ex: if a has a value of 8.66666666666666607455 and b = 2370
Linux gives me a value of 20540 but Solaris gives 20539.
Any idea on resolving folating point issues?
Any standard functions or algorithms or methodologies used in the industry??
For ex:
double a;
long long b;
long long res;
..
..
...
res = a * b;
.....
....
..
res is different on Solaris and Linux platforms
Ex: if a has a value of 8.66666666666666607455 and b = 2370
Linux gives me a value of 20540 but Solaris gives 20539.
Any idea on resolving folating point issues?
Any standard functions or algorithms or methodologies used in the industry??