Re: Floating point questions



In article <ZrydnXatrricSD7ZnZ2dnUVZ_q-dnZ2d@xxxxxxxxxx>,
Dave Froble <davef@xxxxxxxxxxxxx> writes:
Bill Gunshannon wrote:
In article <pbmdnWPxweiwrD7ZnZ2dnUVZ_rSdnZ2d@xxxxxxxxxx>,
Dave Froble <davef@xxxxxxxxxxxxx> writes:
JF Mezei wrote:
briggs@xxxxxxxxxxxxxxxxx wrote:
Doesn't help if you have to convert from float binary to float decimal
to perform the comparison.

We haven't been told what format the source data is in.
Source data is a GPS that provides litten endian IEEE 32 bit value.

Someone mentioned that 1.0e25 could not be precisely represented in such
a 32 bit entity ? Is that really the case ? Isn't it just a case of
representing 1.0 and then "25" in the field that defines where the
decimal is located ?
In your particular case you're dealing in latitude and longitude,
usually expressed in degrees, minutes, seconds, and fractions thereof.

It will not be hard to convert such to whatever measurement you wish to
use, meters, feet, yards, miles, etc.

Not hard????

What is the distance between:
70d0m0s E 70d0m0s N and 80d0m0s E 70d0m0s
and now:
70d0m0s E 10d0m0s N and 80d0m0s E 10d0m0s

Somehow I have to believe the math needed to compute distance
based on latitude and longitude is complex enough to not qualify
as "not hard". :-)
Of course, if there is a simple method I would love to see it. I
assumed the this difficulty is why the military always used UTM
rather than Lat/Lon.

bill


Assume a sphere. Ok, I'm aware that the Planet is not really so
uniform, but for most purposes the assumption is adequate.

There was a time when I'd have been able to do the math. That was about
40 years ago, and I'm not going to dig out the books for this question.

I've got a couple under $100 GPS units that will give me distance from
one point to another. It is doable.

I wasn't arguing that it wasn't doable. Just that because the
distance between lines of longitude are not uniform varying with
latitude the math is more complex. When someone tells me some
math problem is "not hard" I assume that means the average person
can do it nn their head. Somehow I doubt that the linear distance
between two arbitrary points on the globe meets that definition.


Now if altitude is also a consideration, then the math is a bit more
complex. However, once the formulas are set up, it's just a matter of
plugging in the numbers.

But that's true about any math formula no matter how complex. The
initial programming is the part that doesn't meet the "not hard"
criteria.

bill

--
Bill Gunshannon | de-moc-ra-cy (di mok' ra see) n. Three wolves
bill@xxxxxxxxxxxxxxx | and a sheep voting on what's for dinner.
University of Scranton |
Scranton, Pennsylvania | #include <std.disclaimer.h>
.



Relevant Pages

  • Re: Floating point questions
    ... In your particular case you're dealing in latitude and longitude, ... Somehow I have to believe the math needed to compute distance ... There was a time when I'd have been able to do the math. ...
    (comp.os.vms)
  • Re: Floating point questions
    ... In your particular case you're dealing in latitude and longitude, ... Somehow I have to believe the math needed to compute distance ... There was a time when I'd have been able to do the math. ...
    (comp.os.vms)
  • Re: Floating point questions
    ... In your particular case you're dealing in latitude and longitude, ... Somehow I have to believe the math needed to compute distance ... There was a time when I'd have been able to do the math. ...
    (comp.os.vms)
  • Re: Galilean transformation equations
    ... psychology of Robert Winn.- Hide quoted text - ... Isn't this enough mathematics for you, Robert? ... (distance in S')/ ... You've got the math. ...
    (sci.physics.relativity)

Loading