Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Math question...
Message
From
13/09/2003 01:58:41
 
 
To
13/09/2003 01:15:16
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00828722
Message ID:
00828734
Views:
18
>Al,
>
>Thanks for the reply;
>I'm using javascript to calc the numbers so I have the issue with foxpro and big numbers beat. What I am doing is calculating from xy coords as latitude. sooo.. I should be able to make x= 0 to figure out y and vice versa

OK, so now you have your two equations:

(1) 25.55473031282366 = 25.58370393303106000000+(0.00000000000000057943*(x))+(-0.00014485079370171063*(y))+(-0.00000000000000000022*((x)*(x)))+(-0.00000000000000000002*(x)*(y))+(-0.00000000008653667642*((y)*(y)))

(2) x = 0

First, I'm going blind and finger-cramped dealing with all those digits in (1) so let's restate it as:

(3) V = A + Bx + Cy + Dx^2 + Exy + Fy^2

Substituting (2) into (3) gives us

(4) V = A + Cy + Fy^2

We can restate this as a standard quadratic equation:

(5) Fy^2 + Cy + (A - V) = 0

You can then use the Quadratic Formula (e.g. http://mathworld.wolfram.com/QuadraticEquation.html ) to determine the 2 roots, which may both be real, or complex. If complex, you'll likely have to trap the error (taking the square root of a negative number) in your math routine.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform