Simimilar problem to Math.Atan2 or class instance problem in C# and add two double given wrong result
It is something that simple lines:
public static String DegreeToRadianStr(Double degree)
{
Double piBy180 = (Math.PI / 180);
Double Val = (piBy180 * degree); // Here it is giving wrong value
}
piBy180 * degree = -3.1415926535897931 but Val = -3.1415927410125732
alt text http://www.imagechicken.com/uploads/1262936639009840000.jpg I really have no clue what to do .. Please ask some questions regarding this, so that I can point out where it is going wrong.
It is amazing that piBy180 is keeping correct value.
Same thing is happening with other functions too, But some how I manipulated to get correct values.
I am using MS Visual Studio s C#.net SP1.