Hi,

if I put your long_diff in my calculator and execute 1 / tan(long_diff)
I get exactly your 1206.xxx with long_diff = 0.0475 with degree setting.
When I execute your complete calculation with radiant setting I come to the same result. So how did you calulate your result? cot isn't 1/tan, as far as I know. cot is the reverse of tan, that's why they write tan^-1 on calculators.

Mathematics are helpful, sometimes,
Henk


Ammi Aithal wrote:

Part of my code where I am getting different values is
enclosed below.

//All variables are of type double.
long_diff = fabs(lon1_deg - lon2_deg)/2.0; //Absolute
value
cot1 = 1/(tan((long_diff)/90 * pi/2));

//cot1 value when I compile thro CW -
1206.226660616226
with long_diff value 0.04749999999999943

//Calculator gives me 69111.712627 which is correct
b'cos I get the correct distance using this value.
Does anybody have any clue on this behaviour.

--
-------------------------------------------------------------------------
[EMAIL PROTECTED]                                       www.metaviewsoft.de

<A HREF="http://www.handango.com/PlatformTopSoftware.jsp?authorId=95946";>
<IMG SRC="http://user.cs.tu-berlin.de/~jonash/werbung.jpg";></A>
-------------------------------------------------------------------------


--
For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/

Reply via email to