class point{
public :
longlongdouble x, y, z, xp, yp, zp;
void modifypoint(longlongdouble initial[][3],longlongdouble
rotate[][3], longlongdouble a1,
longlongdouble b1, longlongdouble c1, int i)
{
x = initial[i][0];
y = initial[i][1];
z = initial[i][2];
xp = x*cos(b1)*cos(c1) + y*cos(b1)*sin(c1) - z*sin(b1);
yp = x*( sin(a1)*sin(b1)*cos(c1)-cos(a1)*sin(c1) )
+y*( sin(a1)*sin(b1)*sin(c1)+cos(a1)*cos(c1) )
+z*( sin(a1)*cos(b1) );
zp = x*( cos(a1)*sin(b1)*cos(c1)+sin(a1)*sin(c1) )
+ y*( cos(a1)*sin(b1)*sin(c1)-sin(a1)*cos(c1) )
+ z*( cos(a1)*cos(b1) );
rotate[i][0] = xp;
rotate[i][1] = yp;
rotate[i][2] = zp;
}
};
Before change all the 'double' into long long double, i get no error. But after the changes i get the error message, but i need the long long for precision. Is there any possible way to fix this error without sacrificing the precision?
Why do you need so much precision? Long long double is not a legal type, and might be recognised as a long long int by your compiler. Which version of compiler are you using? long double is a legal type.
Opps sorry, the problems is from my carelessness, i didn't noticed i opened 2 main.cpp at a same time. I guess this was the cause of the problems. I want the program to calculate the coordinate precisely, during the process, it will pass many long decimal number, i just hope i can get a very precise number.