8-byte double long integer to floating point? 
Author Message
 8-byte double long integer to floating point?

Hi!

 Anybody knows how to convert an 8-byte double long integer to
floating point? I have some examples of the 8-byte number and the
equivalent floating point in below table:

         8-byte in Hex           Floating Point in Decimal
      -----------------------   --------------------------
      00 00 00 00 00 00 00 00 = 0
      2D 43 1C EB E2 36 1A 3F = 0.001
      FC A9 F1 D2 4D 62 50 3F = 0.01
      7B 14 AE 47 E1 7A 84 3F = 0.1
      29 5C 8F C2 F5 28 BC 3F = 0.1111
      9E 5E 29 CB 10 C7 F1 3F = 1.1111
      72 8A 8E E4 F2 FF 23 40 = 9.9999
      4E D1 91 5C FE FF 58 40 = 99.9999
      2A 3A 92 CB FF 3F 8F 40 = 999.9999
      A3 23 B9 FC FF 87 C3 40 = 9999.9999
      C9 E5 FF 57 34 6F 9D 41 = 123456789.9999
      8F E4 F2 C3 29 8C 67 41 = 12345678.1234
      74 24 97 1F 87 D6 32 41 = 1234567.1234
      3F E4 5F 9C E7 74 A6 42 = 12345678901234.12
      E1 63 9D 31 95 6A E5 43 = 12345678901234.12
      4E D1 91 5C 7E 48 93 C0 = -1234.1234
      92 5C 7E 54 34 6F 9D C1 = -123456789.1234
      49 2E FF FF CF 12 63 C1 = -9999999.9999

I have tried using MKS and other methods but failed. I might be
wrong if the above format is not in double long integer format.

Thank very much!

Ted



Mon, 23 Mar 1998 03:00:00 GMT  
 8-byte double long integer to floating point?
Quote:

>Hi!

> Anybody knows how to convert an 8-byte double long integer to
>floating point? I have some examples of the 8-byte number and the
>equivalent floating point in below table:

>         8-byte in Hex           Floating Point in Decimal
>      -----------------------   --------------------------
>      00 00 00 00 00 00 00 00 = 0
>      2D 43 1C EB E2 36 1A 3F = 0.001
>      FC A9 F1 D2 4D 62 50 3F = 0.01
>      7B 14 AE 47 E1 7A 84 3F = 0.1
>      29 5C 8F C2 F5 28 BC 3F = 0.1111
>      9E 5E 29 CB 10 C7 F1 3F = 1.1111
>      72 8A 8E E4 F2 FF 23 40 = 9.9999
>      4E D1 91 5C FE FF 58 40 = 99.9999
>      2A 3A 92 CB FF 3F 8F 40 = 999.9999
>      A3 23 B9 FC FF 87 C3 40 = 9999.9999
>      C9 E5 FF 57 34 6F 9D 41 = 123456789.9999
>      8F E4 F2 C3 29 8C 67 41 = 12345678.1234
>      74 24 97 1F 87 D6 32 41 = 1234567.1234
>      3F E4 5F 9C E7 74 A6 42 = 12345678901234.12
>      E1 63 9D 31 95 6A E5 43 = 12345678901234.12
>      4E D1 91 5C 7E 48 93 C0 = -1234.1234
>      92 5C 7E 54 34 6F 9D C1 = -123456789.1234
>      49 2E FF FF CF 12 63 C1 = -9999999.9999

>I have tried using MKS and other methods but failed. I might be
>wrong if the above format is not in double long integer format.

>Thank very much!

>Ted


Try compiling and running the following program.
It might give you a clue.

#include <stdio.h>
#include <stdlib.h>
#include <math.h>

int main()
{
int     i;
unsigned char *p;
double  d = 0.001;

        p = (unsigned char *)&d;
        for(i = 0;i < sizeof(double);++i)
                printf("%x ",*p++);
        printf("= %f\n",d);
        printf("This program has just printed the internal representation\n");
        printf("of a double precision floating point number.\n");
        return(0);

Quote:
}

I'm curious as to how you correlated (incorrectly) these '8-byte numbers'
with the floating point values, but yet do not understand that the
'8-byte numbers' are simply a (little-endian) memory dump of double precision
floating point numbers.

Is it possible that you think variables of type 'double' are integers?
Your confusion appears to be quite profound.

GV



Mon, 23 Mar 1998 03:00:00 GMT  
 8-byte double long integer to floating point?

: >Hi!
: >
: > Anybody knows how to convert an 8-byte double long integer to
: >floating point? I have some examples of the 8-byte number and the
: >equivalent floating point in below table:
: >
: >         8-byte in Hex           Floating Point in Decimal
: >      -----------------------   --------------------------
: >      00 00 00 00 00 00 00 00 = 0
: >      2D 43 1C EB E2 36 1A 3F = 0.001
: >      FC A9 F1 D2 4D 62 50 3F = 0.01
: >      7B 14 AE 47 E1 7A 84 3F = 0.1
: >      29 5C 8F C2 F5 28 BC 3F = 0.1111
: >      9E 5E 29 CB 10 C7 F1 3F = 1.1111
: >      72 8A 8E E4 F2 FF 23 40 = 9.9999
: >      4E D1 91 5C FE FF 58 40 = 99.9999
: >      2A 3A 92 CB FF 3F 8F 40 = 999.9999
: >      A3 23 B9 FC FF 87 C3 40 = 9999.9999
: >      C9 E5 FF 57 34 6F 9D 41 = 123456789.9999
: >      8F E4 F2 C3 29 8C 67 41 = 12345678.1234
: >      74 24 97 1F 87 D6 32 41 = 1234567.1234
: >      3F E4 5F 9C E7 74 A6 42 = 12345678901234.12
: >      E1 63 9D 31 95 6A E5 43 = 12345678901234.12
: >      4E D1 91 5C 7E 48 93 C0 = -1234.1234
: >      92 5C 7E 54 34 6F 9D C1 = -123456789.1234
: >      49 2E FF FF CF 12 63 C1 = -9999999.9999
: >
: >I have tried using MKS and other methods but failed. I might be
: >wrong if the above format is not in double long integer format.
: >
: >Thank very much!
: >
: >Ted

: >
: >
: Try compiling and running the following program.
: It might give you a clue.

: #include <stdio.h>
: #include <stdlib.h>
: #include <math.h>

: int main()
: {
: int   i;
: unsigned char *p;
: double        d = 0.001;

:       p = (unsigned char *)&d;
:       for(i = 0;i < sizeof(double);++i)
:               printf("%x ",*p++);
:       printf("= %f\n",d);
:       printf("This program has just printed the internal representation\n");
:       printf("of a double precision floating point number.\n");
:       return(0);
: }

: I'm curious as to how you correlated (incorrectly) these '8-byte numbers'
: with the floating point values, but yet do not understand that the
: '8-byte numbers' are simply a (little-endian) memory dump of double precision
: floating point numbers.

: Is it possible that you think variables of type 'double' are integers?
: Your confusion appears to be quite profound.

: GV

Now I just accidently flamed a full mathermatics prophesor at Purdue but
this pompus ass deservers it! "profound" indeed.... quite very quite
What a pompus, liberal, socialist, commie dog of .... ....
--



Tue, 24 Mar 1998 03:00:00 GMT  
 8-byte double long integer to floating point?

: : Hi!

: :  Anybody knows how to convert an 8-byte double long integer to
: : floating point? I have some examples of the 8-byte number and the
: : equivalent floating point in below table:

: :          8-byte in Hex           Floating Point in Decimal
: :       -----------------------   --------------------------
: :       00 00 00 00 00 00 00 00 = 0
: :       2D 43 1C EB E2 36 1A 3F = 0.001
: :       FC A9 F1 D2 4D 62 50 3F = 0.01
: :       7B 14 AE 47 E1 7A 84 3F = 0.1
: :       29 5C 8F C2 F5 28 BC 3F = 0.1111
: :       9E 5E 29 CB 10 C7 F1 3F = 1.1111
: :       72 8A 8E E4 F2 FF 23 40 = 9.9999
: :       4E D1 91 5C FE FF 58 40 = 99.9999
: :       2A 3A 92 CB FF 3F 8F 40 = 999.9999
: :       A3 23 B9 FC FF 87 C3 40 = 9999.9999
: :       C9 E5 FF 57 34 6F 9D 41 = 123456789.9999
: :       8F E4 F2 C3 29 8C 67 41 = 12345678.1234
: :       74 24 97 1F 87 D6 32 41 = 1234567.1234
: :       3F E4 5F 9C E7 74 A6 42 = 12345678901234.12
: :       E1 63 9D 31 95 6A E5 43 = 12345678901234.12
: :       4E D1 91 5C 7E 48 93 C0 = -1234.1234
: :       92 5C 7E 54 34 6F 9D C1 = -123456789.1234
: :       49 2E FF FF CF 12 63 C1 = -9999999.9999

: : I have tried using MKS and other methods but failed. I might be
: : wrong if the above format is not in double long integer format.

: It might not be double long integer format.  Notice the negative
: values do not seem to have their MSB set (even if you account for
: big-endian, little endian, or any byte swapping).  Also, the value
:  
:        3F E4 5F 9C E7 74 A6 42 = 12345678901234.12
:        E1 63 9D 31 95 6A E5 43 = 12345678901234.12

: appears twice with two different 8-byte codes!

: Maybe if you post a little more background or other information
: we can try to figure out the pattern.

: --
: Peter M. Tutko

Look at all these people that have helped you out and have not been
pompus liberal asses. Maybe the world is good after all. The solution you
need is as follows. Use the type long long on unix systems to get 64 bit
integers.


--



Tue, 24 Mar 1998 03:00:00 GMT  
 8-byte double long integer to floating point?
Quote:

>Hi!
> Anybody knows how to convert an 8-byte double long integer to
>floating point? I have some examples of the 8-byte number and the
>equivalent floating point in below table:

>         8-byte in Hex           Floating Point in Decimal
>      -----------------------   --------------------------
>      00 00 00 00 00 00 00 00 = 0
>      2D 43 1C EB E2 36 1A 3F = 0.001
>      FC A9 F1 D2 4D 62 50 3F = 0.01
>      7B 14 AE 47 E1 7A 84 3F = 0.1
>      29 5C 8F C2 F5 28 BC 3F = 0.1111
>      9E 5E 29 CB 10 C7 F1 3F = 1.1111
>      72 8A 8E E4 F2 FF 23 40 = 9.9999
>      4E D1 91 5C FE FF 58 40 = 99.9999
>      [** more stuff: deleted **]
>I have tried using MKS and other methods but failed. I might be
>wrong if the above format is not in double long integer format.
>Thank very much!

>Ted


Ok bad newsgroup, but serious question.
Hint : rerun the above program, but use only simple numbers containing
fewer bits: powers of two(both exponent and mantissa are binary!!)
 Just (0, 1, 2, 256, 64K,etc plus their inverses and negatives should work)
analyse the output and try to extract exponent&& mantissa.

 BTW if it is a *NATIVE* floating point-format , you could
just use the library function "frexp()" . If not, byteswapping might help.

If the problem is that your native platform doesn't support 64bit ints,
and there is no ldexp(int64),
then *maybe* two seperate calls to ldexp() with some shifting between them
could help. Otherwise you need to do the bit-twiddling yourself. {*filter*}.

Lots of Luck,
Adriaan van Kessel.



Tue, 24 Mar 1998 03:00:00 GMT  
 8-byte double long integer to floating point?
: Hi!

:  Anybody knows how to convert an 8-byte double long integer to
: floating point? I have some examples of the 8-byte number and the
: equivalent floating point in below table:

:          8-byte in Hex           Floating Point in Decimal
:       -----------------------   --------------------------
:       00 00 00 00 00 00 00 00 = 0
:       2D 43 1C EB E2 36 1A 3F = 0.001
:       FC A9 F1 D2 4D 62 50 3F = 0.01
:       7B 14 AE 47 E1 7A 84 3F = 0.1
:       29 5C 8F C2 F5 28 BC 3F = 0.1111
:       9E 5E 29 CB 10 C7 F1 3F = 1.1111
:       72 8A 8E E4 F2 FF 23 40 = 9.9999
:       4E D1 91 5C FE FF 58 40 = 99.9999
:       2A 3A 92 CB FF 3F 8F 40 = 999.9999
:       A3 23 B9 FC FF 87 C3 40 = 9999.9999
:       C9 E5 FF 57 34 6F 9D 41 = 123456789.9999
:       8F E4 F2 C3 29 8C 67 41 = 12345678.1234
:       74 24 97 1F 87 D6 32 41 = 1234567.1234
:       3F E4 5F 9C E7 74 A6 42 = 12345678901234.12
:       E1 63 9D 31 95 6A E5 43 = 12345678901234.12
:       4E D1 91 5C 7E 48 93 C0 = -1234.1234
:       92 5C 7E 54 34 6F 9D C1 = -123456789.1234
:       49 2E FF FF CF 12 63 C1 = -9999999.9999

: I have tried using MKS and other methods but failed. I might be
: wrong if the above format is not in double long integer format.

It might not be double long integer format.  Notice the negative
values do not seem to have their MSB set (even if you account for
big-endian, little endian, or any byte swapping).  Also, the value

       3F E4 5F 9C E7 74 A6 42 = 12345678901234.12
       E1 63 9D 31 95 6A E5 43 = 12345678901234.12

appears twice with two different 8-byte codes!

Maybe if you post a little more background or other information
we can try to figure out the pattern.

--
Peter M. Tutko



Tue, 24 Mar 1998 03:00:00 GMT  
 8-byte double long integer to floating point?

: : Hi!

: :  Anybody knows how to convert an 8-byte double long integer to
: : floating point? I have some examples of the 8-byte number and the
: : equivalent floating point in below table:

: :          8-byte in Hex           Floating Point in Decimal
: :       -----------------------   --------------------------
: :       00 00 00 00 00 00 00 00 = 0
: :       2D 43 1C EB E2 36 1A 3F = 0.001
: :       FC A9 F1 D2 4D 62 50 3F = 0.01
: :       7B 14 AE 47 E1 7A 84 3F = 0.1
: :       29 5C 8F C2 F5 28 BC 3F = 0.1111
: :       9E 5E 29 CB 10 C7 F1 3F = 1.1111
: :       72 8A 8E E4 F2 FF 23 40 = 9.9999
: :       4E D1 91 5C FE FF 58 40 = 99.9999
: :       2A 3A 92 CB FF 3F 8F 40 = 999.9999
: :       A3 23 B9 FC FF 87 C3 40 = 9999.9999
: :       C9 E5 FF 57 34 6F 9D 41 = 123456789.9999
: :       8F E4 F2 C3 29 8C 67 41 = 12345678.1234
: :       74 24 97 1F 87 D6 32 41 = 1234567.1234
: :       3F E4 5F 9C E7 74 A6 42 = 12345678901234.12
: :       E1 63 9D 31 95 6A E5 43 = 12345678901234.12
: :       4E D1 91 5C 7E 48 93 C0 = -1234.1234
: :       92 5C 7E 54 34 6F 9D C1 = -123456789.1234
: :       49 2E FF FF CF 12 63 C1 = -9999999.9999

: : I have tried using MKS and other methods but failed. I might be
: : wrong if the above format is not in double long integer format.

: It might not be double long integer format.  Notice the negative
: values do not seem to have their MSB set (even if you account for
: big-endian, little endian, or any byte swapping).  Also, the value
:  
:        3F E4 5F 9C E7 74 A6 42 = 12345678901234.12
:        E1 63 9D 31 95 6A E5 43 = 12345678901234.12

: appears twice with two different 8-byte codes!

: Maybe if you post a little more background or other information
: we can try to figure out the pattern.

: --
: Peter M. Tutko

Oh, sorry you need more than that. Do a man int to get references to the
functions you need.

--



Tue, 24 Mar 1998 03:00:00 GMT  
 8-byte double long integer to floating point?


Quote:
>Look at all these people that have helped you out and have not been
>pompus liberal asses. Maybe the world is good after all. The solution you
>need is as follows. Use the type long long on unix systems to get 64 bit
>integers.

Bull.  Shit.

1.  There is no "long long" in C.
2.  The man is using *FLOATING POINT* numbers.  How do you propose he store
them in an integral type?

The reason people are so pompous is that they prefer to answer questions
about the C language, and they prefer to do so *correctly*.  If you
haven't got clue one what you're talking about, shut the *HELL* up and
leave it to people who do.

Dan Pop may not always be friendly, but I've only seen him wrong once in
the last year or two.

-s
--

C/Unix proto-wizard -- C/Unix questions? Send mail for help.  No, really!
Copyright 1995 Peter Seebach.  Like my work?  Send donations!
The *other* C FAQ - ftp taniemarie.solon.com /pub/c/afq



Tue, 24 Mar 1998 03:00:00 GMT  
 8-byte double long integer to floating point?
[snip]
Quote:
>Now I just accidently flamed a full mathermatics prophesor at

[snip]

What is a full mathermatics prophesor and why did you flame it?

You have not contributed a single helpful word to this thread.
It has nothing to do with long longs or 64-bit ints.

GV



Thu, 26 Mar 1998 03:00:00 GMT  
 8-byte double long integer to floating point?

: [snip]
: >Now I just accidently flamed a full mathermatics prophesor at
: [snip]

: What is a full mathermatics prophesor and why did you flame it?

: You have not contributed a single helpful word to this thread.
: It has nothing to do with long longs or 64-bit ints.

: GV

Man what a lame brain. I suppose he doesn't use unix. Well, other
operating systems have 64 bit integer types too, like long long. SGI has
got long long, Sun's have long long, Gnu has long long, IBM AIX has long
long. Man billion dolar companies here. I don't give a dam if it isn't in
the ANSI spec. You post is about conversions of types. Well, instead of
looking at the bits and nibbles like a bone head (this is why the first
guy that responed was so pompus by the way) find functions in your OS
that do the job. I pointed out some in unix. I'm sure there are some in
other OS's. Now I would hate to think what you turn out to be.

Aol.com has ended the internet as we know it.
just read this thread

--



Fri, 27 Mar 1998 03:00:00 GMT  
 8-byte double long integer to floating point?


Quote:
>Man what a lame brain. I suppose he doesn't use unix. Well, other
>operating systems have 64 bit integer types too, like long long. SGI has
>got long long, Sun's have long long, Gnu has long long, IBM AIX has long
>long.

Not really.  I just tried this "long long" thing on a Sun box, and it gave
me a syntax error.  Maybe you're clueless.

Quote:
>Man billion dolar companies here. I don't give a dam if it isn't in
>the ANSI spec. You post is about conversions of types. Well, instead of
>looking at the bits and nibbles like a bone head (this is why the first
>guy that responed was so pompus by the way) find functions in your OS
>that do the job. I pointed out some in unix. I'm sure there are some in
>other OS's. Now I would hate to think what you turn out to be.

Sheesh.  The original poster started talking about "long double integers".
This is meaningless.  A double is a *floating point* type.  *No* floating
point type is an integer of any sort.

Many, many systems do not have *ANY* 64-bit type.  None at all.  Perhaps
more importantly, *IT IS NOT THE OS*.  It is the *COMPILER*.  I have a gcc
which uses long longs (warning about them in ANSI mode), and I have one
which doesn't.

You've spent quite a lot of time telling people things, but the things
you're saying might as well be PGP encrypted, or a dream quest, for all
the comprehensibility and general relevance they have.  Once again,
PLEASE take the time to read the FAQ before posting obvious nonsense.

-s
--

C/Unix proto-wizard -- C/Unix questions? Send mail for help.  No, really!
Copyright 1995 Peter Seebach.  Like my work?  Send donations!
The *other* C FAQ - ftp taniemarie.solon.com /pub/c/afq



Fri, 27 Mar 1998 03:00:00 GMT  
 8-byte double long integer to floating point?

...
 > : You have not contributed a single helpful word to this thread.
 > : It has nothing to do with long longs or 64-bit ints.
 >
 > Man what a lame brain. I suppose he doesn't use unix. Well, other
 > operating systems have 64 bit integer types too, like long long.

So what?  As George Varndell wrote it had nothing to do with long longs
or 64-bit ints.  Until now you contributed the following:

 > Now I just accidently flamed a full mathermatics prophesor at Purdue but
 > this pompus ass deservers it! "profound" indeed.... quite very quite
 > What a pompus, liberal, socialist, commie dog of .... ....

What does this contribute?  Next:

 > Oh, sorry you need more than that. Do a man int to get references to the
 > functions you need.

What do you think that provides (except pointers to the fortran INT
functions if Fortran has been installed)?  Followed by:

 > Look at all these people that have helped you out and have not been
 > pompus liberal asses. Maybe the world is good after all. The solution you
 > need is as follows. Use the type long long on unix systems to get 64 bit
 > integers.

You forget the important part in the question, the conversion.
The original question (that you probably never did read) was:

 >  Anybody knows how to convert an 8-byte double long integer to
 > floating point? I have some examples of the 8-byte number and the
 > equivalent floating point in below table:
 >          8-byte in Hex           Floating Point in Decimal
 >       -----------------------   --------------------------
 >       00 00 00 00 00 00 00 00 = 0
 >       2D 43 1C EB E2 36 1A 3F = 0.001

Pray tell the world how your preferred 64 bit integers help in performing
the above conversion.  I do not see it.

 >                                                        Well, instead of
 > looking at the bits and nibbles like a bone head (this is why the first
 > guy that responed was so pompus by the way) find functions in your OS
 > that do the job. I pointed out some in unix.

So, what functions did you point at?  I have not seen any mentioned in
what you have written.  And did you verify the functions you intended
do the conversions wanted (no, of course not)?

 > Aol.com has ended the internet as we know it.

More like it is rahul.net.
--
dik t. winter, cwi, kruislaan 413, 1098 sj  amsterdam, nederland, +31205924098



Sat, 28 Mar 1998 03:00:00 GMT  
 8-byte double long integer to floating point?

Quote:

> Anybody knows how to convert an 8-byte double long integer to
>floating point? I have some examples of the 8-byte number and the
>equivalent floating point in below table:

     If you're on a 680x0 Macintosh, it's easy.  Just declare a
variable of type "comp", which is a 64-bit signed integer.
To convert it to type "extended", you have to
make a direct SANE call to function F2CX in assembler.  This
gets you an 80-bit extended, with a 64-bit mantissa, so there's
no loss of precision.

     This won't work on a PowerPC or an Intel-based machine, though,
because they only have 64-bit doubles.

                                        John Nagle



Sat, 28 Mar 1998 03:00:00 GMT  
 8-byte double long integer to floating point?
 >                 I have some examples of the 8-byte number and the
 > equivalent floating point in below table:
 >
As has already been noted, some of the values are wrong:

 >          8-byte in Hex           Floating Point in Decimal
 >       -----------------------   --------------------------
 >       00 00 00 00 00 00 00 00 = 0
 >       2D 43 1C EB E2 36 1A 3F = 0.001
0.0001
 >       FC A9 F1 D2 4D 62 50 3F = 0.01
0.001
 >       7B 14 AE 47 E1 7A 84 3F = 0.1
 >       29 5C 8F C2 F5 28 BC 3F = 0.1111
0.11
 >       9E 5E 29 CB 10 C7 F1 3F = 1.1111
 >       72 8A 8E E4 F2 FF 23 40 = 9.9999
 >       4E D1 91 5C FE FF 58 40 = 99.9999
 >       2A 3A 92 CB FF 3F 8F 40 = 999.9999
 >       A3 23 B9 FC FF 87 C3 40 = 9999.9999
 >       C9 E5 FF 57 34 6F 9D 41 = 123456789.9999
 >       8F E4 F2 C3 29 8C 67 41 = 12345678.1234
 >       74 24 97 1F 87 D6 32 41 = 1234567.1234
 >       3F E4 5F 9C E7 74 A6 42 = 12345678901234.12
12345678901234.123
 >       E1 63 9D 31 95 6A E5 43 = 12345678901234.12
12345678901234567000.0
 >       4E D1 91 5C 7E 48 93 C0 = -1234.1234
 >       92 5C 7E 54 34 6F 9D C1 = -123456789.1234
 >       49 2E FF FF CF 12 63 C1 = -9999999.9999

To do the conversion (and watch for the error message "floating point
formats not linked" you will get on some systems; see the manuals on
how to solve that):
    #include <stdio.h>

    double convert(char *s) {
        int i;
        union {
            char b[8];
            double d;
        } bd;

        /* If this small program prints "-3.23633e+292" or something
           similar, replace "7 - i" by plain "i". */
        for(i = 0; i < 8; i++) bd.b[i] = s[7 - i];
        return bd.d;
    }

    /* Third number as example. */
    main() {
        printf("%g\n", convert("\xfc\xa9\xf1\xd2\x4d\x62\x50\x3f"));
    }

And, Matthew Carlson, what does this have to do with long long or
64 bit ints?
--
dik t. winter, cwi, kruislaan 413, 1098 sj  amsterdam, nederland, +31205924098



Sat, 28 Mar 1998 03:00:00 GMT  
 8-byte double long integer to floating point?


: >Man what a lame brain. I suppose he doesn't use unix. Well, other
: >operating systems have 64 bit integer types too, like long long. SGI has
: >got long long, Sun's have long long, Gnu has long long, IBM AIX has long
: >long.

: Not really.  I just tried this "long long" thing on a Sun box, and it gave
: me a syntax error.  Maybe you're clueless.

: >Man billion dolar companies here. I don't give a dam if it isn't in
: >the ANSI spec. You post is about conversions of types. Well, instead of
: >looking at the bits and nibbles like a bone head (this is why the first
: >guy that responed was so pompus by the way) find functions in your OS
: >that do the job. I pointed out some in unix. I'm sure there are some in
: >other OS's. Now I would hate to think what you turn out to be.

: Sheesh.  The original poster started talking about "long double integers".
: This is meaningless.  A double is a *floating point* type.  *No* floating
: point type is an integer of any sort.

: Many, many systems do not have *ANY* 64-bit type.  None at all.  Perhaps
: more importantly, *IT IS NOT THE OS*.  It is the *COMPILER*.  I have a gcc
: which uses long longs (warning about them in ANSI mode), and I have one
: which doesn't.

: You've spent quite a lot of time telling people things, but the things
: you're saying might as well be PGP encrypted, or a dream quest, for all
: the comprehensibility and general relevance they have.  Once again,
: PLEASE take the time to read the FAQ before posting obvious nonsense.

: -s
: --

: C/Unix proto-wizard -- C/Unix questions? Send mail for help.  No, really!
: Copyright 1995 Peter Seebach.  Like my work?  Send donations!
: The *other* C FAQ - ftp taniemarie.solon.com /pub/c/afq

I will defend myself:::
Topic of thread: How to convert double long ints to floating point.

I assumed a double long int was a 64 bit int even if the vocabulary was
wrong. Yes, there is no such thing as a double long int but, the poster
is a lame brain. Then I responed by correcting him and telling him about
long long, which is 64 bit ints. Yes, not all compilers have long long
but, so what find one that does. Then I explained to look in man int to
find functions for converting long long types to numerous floating point
types, it would probably have to be extended floating point type to get
the accuracy. Well, people don't realize that not all unix systems have
the same man int page (dah). So they may have to seach a little harder.
If you have a gnu compiler than you should be able to find it.
Next thing I explained is just look it up yourself! If your not on a unix
system than I suppose you will have to read your compiler and OS's manuals.
Tuff. I have simply explained in this thread that no you don't have to
look at the nibbles like and idiot. The way these numbers are represented
in hardware will not likely be the same on different systems. Besides
most systems have 64 bit ints and an extended (80 bit) floating point
type. Now I have had enough of lamers on here getting so upset.

I remind you the question was:  How to convert double long integers to
floating point?

Well, again there is no double long int but I though you knew that. There
is only long long that I know of for 64 bit ints. Yes, this is not ANSI.
I pointed out some functions in unix to do the job. I did not hand them
to you though!!! You will have to read the manual for yourself or do a
man -k long, man -k int, or something. You will find them. I have read
about them in the man int page on a SunOS system with gnu stuff loaded.

Now find the information and stop wanting your hand held and washed and
kissed.

I made reference to the above with the aol.com crack. But, you didn't get
that either. What has happened to the internet anyway. To many stupid
people out there. You notice how the smart ones don't have as many kids.
The gene pool is slowly being eroded away.

P.S. This isn't english so lay of the typo, spelling, grammer responces.

--



Sat, 28 Mar 1998 03:00:00 GMT  
 
 [ 15 post ] 

 Relevant Pages 

1. long long integer and double precision number

2. epsilon for float, double long double

3. long long long long integers

4. How to unpack bytes of a long integer?

5. 10 byte long double?

6. bit manipulation on double long integers

7. Ten byte long doubles

8. floating point rounding or floating point printing ?

9. IEEE conversion: bytes into floating point number...

10. IEEE conversion: bytes into floating point number...

11. convert floating-point value to network byte-order

12. exact integer range of floating point type

 

 
Powered by phpBB® Forum Software