Re: very confused....hex to decimal

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



you nailed it on all accounts, pretty much.

by the way, the reason i know it should be 685630.9500000000 is that i can use a few other
programs (that i didn't write, <g>) that correctly extract the information. it's a UTM x
coordinate. i'm using the other programs to confirm my results.

lance

"Dick Grier" <dick_grierNOSPAM@xxxxxxx> wrote in message
news:OtqQQjs7FHA.3880@xxxxxxxxxxxxxxxxxxxxxxx
> Hi,
>
>>>
> 4124EC7DE6666666
> <<
>
> Why do you know that this should be 685630.95000000000?
>
> A Hex number can only be converted directly to an Integer, Long, etc. It does not
> represent a non-integral value -- and is a MUCH larger number (as the conversions that
> you observe indicate) than your "expected" result.
>
> You must be attempting to convert the binary representation of a floating point number
> to a floating point decimal representation -- This cannot be done with the code that you
> are using, which, naturally, works only with non-floating point (integral) values.
>
> I think that if you Google, you will find code to convert binary FP numbers to decimal
> FP. The "normal" reason for such conversion is that you are receiving a binary data
> stream from some foreign device, and have to convert it for use in your program. If
> this isn't so, then a more detailed explanation is required.
>
> Dick
>
> Dick
>
> --
> Richard Grier (Microsoft Visual Basic MVP)
>
> See www.hardandsoftware.net for contact information.
>
> Author of Visual Basic Programmer's Guide to Serial Communications, 4th Edition ISBN
> 1-890422-28-2 (391 pages) published July 2004. See www.mabry.com/vbpgser4 to order.
>
>


.



Relevant Pages

  • Re: very confused....hex to decimal
    ... the conversions that you observe indicate) than your "expected" result. ... You must be attempting to convert the binary representation of a floating ... point number to a floating point decimal representation -- This cannot be ... Dick ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Scientific assumptions [was: Help needed with expletives
    ... What we are saying is that the words he has said are words that, ... isn't a very good reason. ... If I believed Jonathan did want people to think he was a dick then I ... When silencing women is an unintentional effect, it's important to speak ...
    (rec.arts.sf.composition)
  • Re: VOTE today
    ... We don't "need" anybody whose dick is controlling him to that extent. ... but a gay soldier has to shut up. ... There is no reason to have to hide it. ...
    (rec.bicycles.tech)
  • Re: OT: Name cancels Pakistani ambassador to Saudi
    ... Hampshire who revels in the name Dick Swett. ... ambassador to Saudi Arabia. ... had previously floated Zeb's name as ambassador to the United Arab ... only to have him rejected for the same reason. ...
    (sci.military.naval)
  • Re: Decimal: fixed-point or floating-point
    ... The reason I consider Single & Double floating point is the normalization ... point circle & the IEEE floating point circle, ... this is how the Numeric type in SQL works - you specify the ...
    (microsoft.public.dotnet.framework.clr)